appirater-android icon indicating copy to clipboard operation
appirater-android copied to clipboard

R.layout.loveapp used by showLoveDialog does not exist

Open farazs opened this issue 8 years ago • 2 comments

Unless I am missing something, that layout is not defined anywhere and so this block does not work:

LinearLayout layout = (LinearLayout) LayoutInflater.from(mContext).inflate(R.layout.loveapp, 

TextView textView = (TextView)layout.findViewById(R.id.love_dialog_message);
Button yesButton = (Button)layout.findViewById(R.id.love_dialog_yes);
Button noButton = (Button)layout.findViewById(R.id.love_dialog_no);

farazs avatar Feb 22 '17 14:02 farazs

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="300dp" android:layout_height="fill_parent" android:background="@color/black" android:orientation="vertical" android:padding="10dp" >

<TextView
    android:id="@+id/love_dialog_message"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="10dp"
    android:textAlignment="center"
    android:text="@string/love_dialog_content"
    android:textColor="@color/white"
    android:textStyle="bold"
    android:textSize="24sp"/>

<Button
    android:id="@+id/love_dialog_yes"
    style="@style/appiratorButton"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="10dp"
    android:background="@color/colorPrimary"
    android:text="@string/love_dialog_yes"
    android:textStyle="bold"/>

<Button
    android:id="@+id/love_dialog_no"
    style="@style/appiratorButton"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginBottom="10dp"
    android:background="@color/colorPrimary"
    android:text="@string/love_dialog_no"
    android:textStyle="bold"/>

power7714 avatar May 26 '17 07:05 power7714

Copy the LinearLayout parameters from the appirater layout

power7714 avatar May 26 '17 07:05 power7714