Answer the question
In order to leave comments, you need to log in
How to add fragment or xml markup to the dropdown window??
I wanted to add fragment or xml markup to the drop-down window,
AlertDialog.Builder builder = new AlertDialog.Builder(Main.this);
builder.setTitle("Важное сообщение!")
.setMessage("Покормите кота!")
.setTitle(R.id.Nice)
.setCancelable(false)
.setNegativeButton("ОК, иду на кухню",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="@dimen/nav_header_height"
android:background="@drawable/image"
android:gravity="bottom"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:theme="@style/ThemeOverlay.AppCompat.Dark"
android:id="@+id/title">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="@dimen/nav_header_vertical_spacing"
android:text="@string/nik"
android:textSize="30dp"
android:textColor="#000000"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:textColor="#000000"
android:layout_height="wrap_content"
android:text="@string/rang" />
</LinearLayout>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question