【发布时间】:2017-12-28 10:04:04
【问题描述】:
我有一个自定义对话框,xml代码如下,但是对话框打开时视图很小,如何自定义它的大小
<LinearLayout
android:orientation="vertical"
android:background="#ffffff"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:id="@+id/name_list"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</Spinner>
<Button
android:id="@+id/name_search"
android:text="Search"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:background="#ffffff"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
【问题讨论】: