【发布时间】:2010-11-09 13:43:39
【问题描述】:
我的列表视图的行有 3 个文本。我想要做的是垂直对齐所有行文本。我尝试使用该行的 TableLayout 视图,并将第一个和第三个单元格的宽度设置为常量。由于移植问题,我不太喜欢使用常量。是否可以在没有其他方式的情况下对齐这些文本?这是布局:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/ingredient_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<com.one2snap.littlechef.android.main.ui.views.AmienneTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/ingredient_title" />
</LinearLayout>
【问题讨论】: