Android-Rate
Android-Rate copied to clipboard
dialog window custom color and buttons colors
Hello, I tried adding this in main_activity ` .setTitle(R.string.new_rate_dialog_title) .setTextLater(R.string.new_rate_dialog_later) .setTextNever(R.string.new_rate_dialog_never) .setTextRateNow(R.string.new_rate_dialog_ok) .monitor();
LayoutInflater inflater = (LayoutInflater)this.getSystemService(LAYOUT_INFLATER_SERVICE);
View view = inflater.inflate(R.layout.custom_dialog, (ViewGroup)findViewById(R.id.ratedialog));
AppRate.with(this).setView(view).monitor();
AppRate.showRateDialogIfMeetsConditions(this);`
and this in custom_dialog.xml ` <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:minWidth="280dp" android:orientation="vertical" android:padding="10dp" android:id="@+id/ratedialog" android:layout_gravity="center">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="@drawable/dialog_bg2"
android:padding="0dp" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Rate Us!"
android:layout_margin="5dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/black" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="-2dp"
android:background="@drawable/dialog_bg2"
android:padding="0dp" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:text="text text text ?" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Button
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginRight="10dp"
android:background="@drawable/dialog_bg2"
android:minWidth="100dp"
android:text="@string/new_rate_dialog_later" />
<Button
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_marginLeft="10dp"
android:background="@drawable/dialog_bg2"
android:minWidth="100dp"
android:text="@string/rate_dialog_ok" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>`
But it's not working, i can't see the new layout overlapping the apprater dialog. Please help
Did you solve it?
Did you solve it? Unfortunately no
Hi @robertelo , @BrandonZV19
Try to use https://github.com/Vorlonsoft/AndroidRate It should work...
@AlexanderLS what would be the id for ViewGroup in view inflation.? Is this is id of the parent tag of custom layout? View view = inflater.inflate(R.layout.custom_dialog, (ViewGroup)findViewById(R.id.ratedialog)); Thanks
Did anyone manage to resolve this?