Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dialog window custom color and buttons colors #130

Open
robertelo opened this issue Jul 30, 2017 · 5 comments
Open

dialog window custom color and buttons colors #130

robertelo opened this issue Jul 30, 2017 · 5 comments

Comments

@robertelo
Copy link

robertelo commented Jul 30, 2017

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
    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>

`

But it's not working, i can't see the new layout overlapping the apprater dialog. Please help

@BrandonZV19
Copy link

Did you solve it?

@robertelo
Copy link
Author

Did you solve it?
Unfortunately no

@AlexanderLS
Copy link

Hi @robertelo , @BrandonZV19

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

@navczydev
Copy link

@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

@ataravati
Copy link

Did anyone manage to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants