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
以及它假设父母的宽度,即网格不是单元格(不确定),因此宽度变得更多的单元格,因为匹配父母我认为 –