TextViews'父應該匹配整個顯示的寬度。這可以幫助你:
<LinearLayout
android:layout_row="2"
android:layout_column="1"
android:id="@+id/percentLinearLayout"
android:measureWithLargestChild="false"
android:weightSum="2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:textAppearance="@android:style/TextAppearance.Holo.Medium"
android:text="@string/fifteen_percent"
android:id="@+id/percent15TextView"
android:layout_weight="1" />
<TextView
android:layout_width="0px"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/eighteen_percent"
android:id="@+id/percentCustomTextView"
android:layout_weight="1"
android:numeric="integer" />
</LinearLayout>
有了這個第二TextView的熄滅界的Cuz線性佈局超出界限 –
的你是什麼意思與「出界」?什麼邊界? – skywall
以及它假設父母的寬度,即網格不是單元格(不確定),因此寬度變得更多的單元格,因爲匹配父母我認爲 –