android : theme = "@ android : style/Theme.Dialog"와 함께 활동을 사용하여 대화 상자로 사용합니다. 네이티브 대화 상자의 동작에 가장 가까운 것은 무엇입니까 : 대화 상자가 화면 너비에 맞게 채워야합니까? 예를 들어 입력란에 텍스트 상자가 채워져 있으면 동적으로 커야합니까?Android : 대화 상자 너비는 어떻게해야합니까?
내 직감은 대화 상자가 화면을 채우지 않아야한다는 것입니다. 이 동작을 얻으려고했지만, 안드로이드 2.2에서 무엇을해도 대화 상자 폭 은 부모을 채우는 것으로 보입니다.
내 레이아웃 XML은 :
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical">
<TextView android:id="@+id/text" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:autoText="true"
android:text="@string/item_delete_dialog_label"
android:padding="5dip" />
<LinearLayout android:layout_height="wrap_content"
android:orientation="horizontal"
style="@android:style/ButtonBar" android:layout_width="fill_parent">
<Button android:id="@+id/yes" android:layout_height="wrap_content"
android:text="@string/button_yes"
android:layout_width="wrap_content"
android:layout_weight="1"/>
<Button android:id="@+id/no" android:layout_height="wrap_content"
android:text="@string/button_no"
android:layout_width="wrap_content"
android:layout_weight="1"/>
</LinearLayout>
</LinearLayout>
나는 많은 대화가 폭 화면을 채우기 만들기에 관한 질문, 그러나 폭 포장 만들기에 대한 없음을 발견했습니다. 이것을 어떻게 얻을 수 있습니까?