Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio 仅在DialogFragment的一部分内调用ListFragment需要帮助吗_Android Studio_Android Listfragment_Android Dialogfragment_Android Dialog - Fatal编程技术网

Android studio 仅在DialogFragment的一部分内调用ListFragment需要帮助吗

Android studio 仅在DialogFragment的一部分内调用ListFragment需要帮助吗,android-studio,android-listfragment,android-dialogfragment,android-dialog,Android Studio,Android Listfragment,Android Dialogfragment,Android Dialog,这里有一个问题: 但我需要知道的是,当ListFragment不是DialogFragment中的唯一内容时,如何在DialogFragment中调用它。由于我的声誉,我无法发布图片,因此这里是我希望片段具有的大致xml布局(例如,列表只是我片段的一部分,有一个edittext和按钮): 在发帖之前,我试着研究这个话题 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://s

这里有一个问题:

但我需要知道的是,当ListFragment不是DialogFragment中的唯一内容时,如何在DialogFragment中调用它。由于我的声誉,我无法发布图片,因此这里是我希望片段具有的大致xml布局(例如,列表只是我片段的一部分,有一个edittext和按钮):


在发帖之前,我试着研究这个话题

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout   xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">

<EditText
    android:id="@+id/person"
    android:inputType="numberDecimal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="16dp"
    android:layout_marginLeft="4dp"
    android:layout_marginRight="4dp"
    android:layout_marginBottom="4dp"
    android:hint="Name of First Person"
    android:layout_gravity="right" />
<LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:orientation="horizontal"
    android:weightSum="1">
    <ListView
        android:id="@+id/ScrubList"
        android:layout_width="wrap_content"
        android:layout_height="201dp"
        android:padding = "10dp"
        android:layout_alignParentRight="true"
        android:layout_alignParentEnd="true"></ListView>
</LinearLayout>
<Button
    android:id="@+id/btnDone"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="Add to Group"
    android:layout_margin="10dp"
    android:background="@drawable/btn_green"
    style="@style/ButtonText"
    />
</LinearLayout>