Android-Rate icon indicating copy to clipboard operation
Android-Rate copied to clipboard

dialog window custom color and buttons colors

Open robertelo opened this issue 6 years ago • 5 comments

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

robertelo avatar Jul 30 '17 23:07 robertelo

Did you solve it?

BrandonZV19 avatar Apr 19 '18 18:04 BrandonZV19

Did you solve it? Unfortunately no

robertelo avatar Apr 22 '18 03:04 robertelo

Hi @robertelo , @BrandonZV19

Try to use https://github.com/Vorlonsoft/AndroidRate It should work...

AlexanderLS avatar Sep 05 '18 16:09 AlexanderLS

@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

navczydev avatar Sep 14 '19 02:09 navczydev

Did anyone manage to resolve this?

ataravati avatar Oct 15 '19 20:10 ataravati