可能重复:
android - 在TextView中换行
<TextView
android:text="Weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee."
android:id="@+id/txtDesc"
android:maxLines="3"
android:lines="3"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
Run Code Online (Sandbox Code Playgroud)
我试过这样但是最后只显示了一行......
如何设置它显示2行...
如果我使用 android:ellipsize="marquee" instread it won't show ... at the end and show only 1 line
你可以使用两个TextView.在TextView文本的一个节目部分和第二个TextView使用以下代码.我认为椭圆将在一行中显示数据,然后椭圆.如果你使用椭圆,我不需要你可以获得两行数据TextView.这就是为什么我建议你使用两个TextView人的.在最后一次TextView使用椭圆
<TextView
android:text="Weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee are one of the UK�s leading retailers, with over 21 million people visiting our stores each week. We offer stylish, high quality, great value clothing and home products, as well as outstanding quality foods, responsibly sourced from around 2,000 suppliers globally. We employ over 75,000 people in the UK and abroad, and have over 600 UK stores, plus an expanding international business. We are the number one provider of womenswear and lingerie in the UK, and are rapidly growing our market share in menswear, kidswear and home, due in part to our growing online business. Overall, our clothing and homeware sales account for 49% of our business. The other 51% of our business is in food, where we sell everything from fresh produce and groceries, to partly-prepared meals and ready meals. Now more than ever, we�re also known for our green credentials as a result of our five-year eco plan, Plan A, which will see us, amongst other things, become carbon neutral and send no waste to landfill by 2012."
android:id="@+id/txtDesc"
android:maxLines="3"
android:lines="3"
android:ellipsize="end"
android:layout_width="100dip"
android:layout_height="wrap_content"/>
Run Code Online (Sandbox Code Playgroud)
谢谢迪帕克
| 归档时间: |
|
| 查看次数: |
8234 次 |
| 最近记录: |