Alp*_*rae 4 android text clipping tablelayout
我有一个小剪辑的问题,我一直无法使用通过tablerow一个EditText视图来解决.无论我尝试,所述的EditText视图要么剪切(附截图),或者,如果设置了shrinkColumns为0或1,标签文本消失(和的EditText视图占据整个宽度).布局如下:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="vertical" android:padding="10dip">
<TableLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<TableRow android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:paddingRight="10dip" android:layout_column="1"
android:text="Label Text" />
<EditText android:text="Very long text that makes the text view go on clipping frenzy"
android:layout_width="wrap_content" android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我试过它在QVGA和HVGA,一个的HTC Hero上2.1和野火2.1上运行,以及一个2.2模拟器.我也玩过clipToPadding属性,这在我的情况下似乎没什么帮助.如果我使用长文本设置提示属性并将文本值保留为空,则会出现相同的问题.
由于我没有做任何特别复杂的事情,我怀疑我身边有一个简单的错误.任何想法,提示或建议都非常感谢.
干杯!

| 归档时间: |
|
| 查看次数: |
1385 次 |
| 最近记录: |