Android 5.0中的布局显示不正确

时间:2015-01-26 04:19:15

标签: android android-layout

我创建了哪个布局文件有1个radioGroup(3个单选按钮)和1个editText。使用app几分钟后,我总会得到与下图相同的问题。我不知道这个问题的根本原因。我在android 4.4.2上测试过,效果很好。

Error layout normal layout

XML布局

<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>

你对这个问题有什么建议吗? 感谢

0 个答案:

没有答案