【发布时间】:2010-05-16 18:40:30
【问题描述】:
我正在尝试将 TextView 和 ToggleButton 放在表格行中,但是,它们似乎没有对齐(按钮的顶部开始于 textview 顶部下方约 10px,即使每个元素的高度都是一样。谁能告诉我为什么?
<TableLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
>
<TableRow>
<AutoCompleteTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:layout_weight="1"
/>
<ToggleButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</TableRow>
</TableLayout>
【问题讨论】:
标签: android alignment textview togglebutton