There is a dialogue fragment, now it is displayed like this: http://i7.5cm.ru/i/aLZ0.png
It is necessary like this:
Two things are not clear:
Why is there a white bar in the dialogue from above, where did it come from and how to remove it?
How to make the width of the layout, without obscuring, and preferably between the items?
ps The dialogue should be called, attention: from the side curtain.
XML dialog:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#2196f3" android:id="@+id/rate_dialog" android:orientation="vertical"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/ok_sure" android:id="@+id/btn_dialog_yes" android:layout_below="@+id/textView" android:layout_toLeftOf="@+id/btn_dialog_no" android:layout_toStartOf="@+id/btn_dialog_no" android:layout_marginRight="25dp" android:layout_marginEnd="25dp" android:layout_marginTop="68dp" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/no_thanks" android:id="@+id/btn_dialog_no" android:layout_marginRight="22dp" android:layout_marginEnd="22dp" android:layout_alignBaseline="@+id/btn_dialog_yes" android:layout_alignBottom="@+id/btn_dialog_yes" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Do you like Power Thesaurus?" android:textColor="#ffffff" android:layout_marginTop="33dp" android:layout_alignParentTop="true" android:layout_alignRight="@+id/btn_dialog_no" android:layout_alignEnd="@+id/btn_dialog_no" android:layout_marginRight="51dp" android:layout_marginEnd="51dp" /> </RelativeLayout> Dialog code:
public class RateAppFragmentDialog extends DialogFragment implements DialogInterface.OnClickListener{ @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.rate_dialog,null); return view; } In MainActivity I simply create an instance, and pass it the getSupportFragmentManager() and tag.
