2011-02-13 102 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