2011-02-13 66 views
3

我有一个非常奇怪的布局问题......基本上这个RadioGroup中的第一个按钮正在失去它的第一个字母,按照此截图(应该说“预订关闭”,而不是“关闭”):为什么我的android RadioButton文本在开头被截断?

mangled RadioButton text screenshot

的XML片段是相当简单的(和我没有什么有趣的在外部样式或东西):

<LinearLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <RadioGroup android:orientation="vertical" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content"> 
     <RadioButton android:id="@+shift_edit/bookoff" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Booked Off" /> 
     <RadioButton android:id="@+shift_edit/ado" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="ADO" /> 
     <RadioButton android:id="@+shift_edit/working" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:text="Working" /> 
    </RadioGroup> 
</LinearLayout> 

没有人在这里认识到这个问题,并能提供一个解决方案吗?如果它很重要,我使用1.6,因为我要定位的设备只有1.6 ROM。

回答

3

因此,在将我的应用程序部署到真实(Android 1.6)设备后,似乎问题出现在模拟器中。我无法在真实设备上重现它。另外,正如user432209所提到的那样,它似乎并未出现在稍后的模拟器中。更好的是,它只显示第一次时间您呈现一个活动;出去并返回,并且恢复正常。所以我想总的来说这是一个可以忽略的非常小的缺陷。

+0

对于任何人想知道 - 这是完全正确的。有这个确切的问题,并感谢您womble张贴您的问题如此紧密符合我在谷歌查询。 – AndrewPK

+0

我真的不能评价这一点......我花了两个小时试图弄清楚到底是怎么回事,测试不同的模拟器,设备等等。再一次,谢谢。 – AndrewPK

+0

我有同样的问题 - 谢谢你的回答! – Nick

2

我只是将你的代码转储到模拟器中,然后空手而去。它在所有11种通用仿真器样式中的2.1,2.2和2.3都能正常工作。

我会从简单/通用的解决方案开始。重新启动,新的模拟器,新的布局等等等等。

+0

这让我想起...我使用的是1.6(因为我瞄准的是只有那个旧ROM的设备)。问题已更新。 – womble