我有一个用户界面,在其中显示了客户的详细信息。现在,一些客户地址很长,当我在TextView中显示它时,全屏幕布局向地址Textview的末尾方向移动,因此一些参数隐藏起来。我如何保持地址textview修复的长度。我用ellipsize尝试过这样的事情,但没有运气。当TextView数据超出其大小时,屏幕向右移动
<style name="CustomerTextView">
<item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textSize">10sp</item>
<item name="android:textColor">@android:color/white</item>
<item name="android:layout_margin">5dp</item>
<item name="android:background">@drawable/textview_border</item>
<item name ="android:ellipsize">end</item>
</style>
,并为客户的地址我的XML文件看起来像这样
<TableRow android:gravity="right" >
<TextView
style="@style/CustomerLabelTextView"
android:gravity="right"
android:text="@string/customerAddress" />
</TableRow>
<TableRow
android:gravity="right" >
<TextView
android:id="@+id/customerAddress"
style="@style/CustomerTextView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:gravity="right" />
</TableRow>
附上截图 –
我想,但这里 – ZAJ
当你点击编辑有添加图片的选项如何附上截图。 –