mediavrog / integrated-rating-request Goto Github PK
View Code? Open in Web Editor NEWA polite way to ask for ratings.
Home Page: https://play.google.com/store/apps/details?id=net.mediavrog.samples.irr
License: MIT License
A polite way to ask for ratings.
Home Page: https://play.google.com/store/apps/details?id=net.mediavrog.samples.irr
License: MIT License
I am setting the toolbar programmatically. Initially when the nudge screen shows, the irrlayout and the recyclerview behind it are appearing without issue below the actionbar. But when I click on a button, and the next screen appears, the content moves up to overlap the actionbar.
Here is the relevant code :
activity_main.xml
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/imageView3"
android:src="@drawable/app_bg_blur"
android:scaleType="centerCrop" />
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</android.support.v4.widget.DrawerLayout>
app_bar_main.xml
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.qbes.totobus.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<include layout="@layout/content_main" />
</android.support.design.widget.CoordinatorLayout>
content_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.qbes.totobus.MainActivity"
tools:showIn="@layout/app_bar_main">
<com.kennyc.view.MultiStateView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/multiStateView"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:msv_errorView="@layout/error_view"
app:msv_emptyView="@layout/layout_main_empty_view"
app:msv_loadingView="@layout/loading_view"
app:msv_viewState="content">
<android.support.v7.widget.RecyclerView
android:id="@+id/schoolRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical" />
</com.kennyc.view.MultiStateView>
<!-- same layout as in demo app - irrlayout as root -->
<include layout="@layout/layout_integrated_rating"/>
</RelativeLayout>
MainActivity.java
public class MainActivity extends AppCompatActivity {
protected IrrLayout irr;
protected DefaultRuleEngine engine;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
DefaultRuleEngine.trackAppStart(this);
irr = (IrrLayout) findViewById(R.id.irr_layout);
engine = (DefaultRuleEngine) irr.getRuleEngine();
engine.reset(this);
engine.setListener(new DefaultRuleEngine.DefaultOnUserDecisionListener() {
@Override
public void onAccept(Context ctx, IrrLayout.State s) {
super.onAccept(ctx, s);
engine.evaluate();
}
@Override
public void onDismiss(Context ctx, IrrLayout.State s) {
super.onDismiss(ctx, s);
engine.evaluate();
}
});
}
@Override
protected void onResume() {
super.onResume();
engine.evaluate();
}
}
I am not sure if this is caused by IRRLayout, what are your thoughts?
java.lang.ExceptionInInitializerError at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:587) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:807) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.leifacil.vademecum.Atividades.MainActivity.onCreate(MainActivity.java:196) at android.app.Activity.performCreate(Activity.java:5047) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117) at android.app.ActivityThread.access$700(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4867) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NoClassDefFoundError: net.mediavrog.irr.R$id at net.mediavrog.irr.IrrLayout.<clinit>(IrrLayout.java:54) at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:417) at android.view.LayoutInflater.createView(LayoutInflater.java:587) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:687) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:807) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.rInflate(LayoutInflater.java:749) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.parseInclude(LayoutInflater.java:830) at android.view.LayoutInflater.rInflate(LayoutInflater.java:736) at android.view.LayoutInflater.inflate(LayoutInflater.java:489) at android.view.LayoutInflater.inflate(LayoutInflater.java:396) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.leifacil.vademecum.Atividades.MainActivity.onCreate(MainActivity.java:196) at android.app.Activity.performCreate(Activity.java:5047) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117) at android.app.ActivityThread.access$700(ActivityThread.java:134) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4867) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774) at dalvik.system.NativeStart.main(Native Method)
Android 6.0 working normal
for android 4.1.2 with Minify => not working without Minify => not working adding Transitive => not working
It looks like this is opposite what you would usually expect?
After add the library as my app dependency, android:icon="@mipmap/ic_launcher" started to reference the library ic_launcher. Is there a way to remove this?
Unless the list has enough items to show the IRR element, the IrrAdapter should return the decorated adapter item count without offset for IRR.
Hey there, I am part of the Lonely Planet Android development team, we are currently using your helpful integrated rating, one small issue is its availability on Maven Central.
Is there any chance you could port it?
Much appreciated
-Francisco
It would be great to add an link for translation contribution.
Is there not an easy way to test before the configuration settings apply? I don't know whether my layout is incorrect or whether not enough days/attempts have occurred.
After updating my Gradle version to 5.0+ where the compile
keyword has been removed. This causes build errors working when you add this library due to the missing net.mediavrog.ruli
classes this library depends on.
I was able to fix these build errors by adding the following to my list of dependencies
implementation 'net.mediavrog:ruli:1.1.0'
This is a fix on my end when really it should be fixed by migrating the gradle version for this library to 5.0+. I could do it, but the above fixed it for me and back to work I go sorry!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.