A
A
artshelom2017-07-23 22:40:49
Android
artshelom, 2017-07-23 22:40:49

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();

Here I wanted to add another fragment or xml. I did not find how to do it on the Internet.
the file is called: nav_gek.xml
<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>

Can you write if so how?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
7
7365656c65, 2017-07-23
@artshelom

Link.

D
davidnum95, 2017-07-24
@davidnum95

Link.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question