开发者

TextView on android only shows two lines worth of text in either orientation

if the text is longer than the the width the textview, after the second line, it cuts it and adds "..." to the end of it. It doesnt matter the orientation, it will just display more text until the end of the second line, here is the textview XML:

<TextView android:id="@+id/ContentViewerDescription"
                android:layout_width="wrap_content" 
 开发者_开发问答               android:layout_height="match_parent"
                android:layout_weight="1" 
                android:ellipsize="end"
                android:maxLines="20"
                android:textColor="#999999"
                android:layout_marginTop="10px"
                android:layout_marginLeft="10px"/>


change to android:layout_height="wrap_content" and delete android:ellipsize="end"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜