<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Here is ffdsadasfadsfasdrvey result........" /> <LinearLayout
android:id="@+id/layout2"
android:layout_width="match_parent"
android:layout_height="800dp"
android:orientation="vertical"
android:background="@color/white">
</LinearLayout></LinearLayout>
这个XML文件对应一个AlertDialog的派生类,
当android:layout_height="800dp"为android:layout_height="match_parent"的效果如下:当为android:layout_height="800dp"时,效果如下:现在为不想android:layout_height="800dp"这样设置,我想要layout2自动填充除了textView1的剩余区域。汝之奈何????
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Here is ffdsadasfadsfasdrvey result........" /> <LinearLayout
android:id="@+id/layout2"
android:layout_width="match_parent"
android:layout_height="800dp"
android:orientation="vertical"
android:background="@color/white">
</LinearLayout></LinearLayout>
这个XML文件对应一个AlertDialog的派生类,
当android:layout_height="800dp"为android:layout_height="match_parent"的效果如下:当为android:layout_height="800dp"时,效果如下:现在为不想android:layout_height="800dp"这样设置,我想要layout2自动填充除了textView1的剩余区域。汝之奈何????
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent" //这里
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Here is ffdsadasfadsfasdrvey result........" />
<LinearLayout
<span style="color: #FF00FF;">android:id="@+id/layout2"</span>
android:layout_width="match_parent"
android:layout_height="fill_parent" //这里
android:orientation="vertical"
android:background="@color/white">
</LinearLayout>
</LinearLayout>
看错了。原来是要设置dialog。