我遵循描述here的方法来创建EditText输入活动。但是这个视图并不能满足屏幕的宽度。我怎么知道适合屏幕宽度?如何将对话主题活动宽度设置为屏幕宽度?
alt text http://img405.imageshack.us/img405/5057/activitythemed.png
<activity android:name="TextEntryActivity"
android:label="My Activity"
android:theme="@android:style/Theme.Dialog"/>
-
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:orientation="vertical"
android:gravity="right"
android:layout_height="wrap_content">
<EditText
android:text="@+id/txtValue"
android:id="@+id/txtValue"
android:layout_width="fill_parent"
android:layout_height="wrap_content"></EditText>
<Button
android:text="Done"
android:id="@+id/btnDone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"></Button>
</LinearLayout>
我怀疑它是否重复。这个问题是关于Dialog主题活动,它与对话框不同。 – jimmy0251 2014-11-05 19:30:31