android 5.0中的布局显示不正确
我创建了一个布局文件,其中包含1个radioGroup 3单选按钮和1个editText。我总是得到一个问题,如下图一样,几分钟后使用该应用程序。我不知道这个问题的根本原因。我在安卓4.4.2上进行了测试,效果很好 XML布局android 5.0中的布局显示不正确,android,android-layout,Android,Android Layout,我创建了一个布局文件,其中包含1个radioGroup 3单选按钮和1个editText。我总是得到一个问题,如下图一样,几分钟后使用该应用程序。我不知道这个问题的根本原因。我在安卓4.4.2上进行了测试,效果很好 XML布局 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an
<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:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/food_instructions"
android:textAppearance="?android:attr/textAppearanceMedium" />
<RadioGroup
android:id="@+id/layout_instruction_raido_group"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<RadioButton
android:id="@+id/layout_instruction_raido_before_food"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/before_food" />
<RadioButton
android:id="@+id/layout_instruction_raido_with_food"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/with_food" />
<RadioButton
android:id="@+id/layout_instruction_raido_after_food"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/after_food" />
<RadioButton
android:id="@+id/layout_instruction_raido_no_food"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/no_food_instructions" />
</RadioGroup>
<EditText
android:id="@+id/layout_instruction_free_text"
android:labelFor="@+id/layout_instruction_free_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="text">
</EditText>
你对这个问题有什么建议吗?
谢谢看起来还可以。您是否尝试删除android:ems=10和android:labelFor=@+id/layout\u指令\u自由\u文本?@Nguyen DoanTung:我删除了它们,但问题仍然存在。我不认为这是根本原因。感谢TungAre您使用过appcompat库吗?@hidro:我使用的是android-support-v4和support-v13,libsI以前在自动完成文本视图方面遇到过类似问题,可能是appcompat的一个已知错误