展会信息港展会大全

Android ScrollView 中 TextView 多行显示问题
来源:互联网   发布日期:2015-11-25 22:23:05   浏览:4726次  

导读:今天遇到一个问题:Textview中多行文本,最后一行不显示<ScrollView xmlns:android="http://schemas.android.com/apk/res/a...

今天遇到一个问题:Textview中多行文本,最后一行不显示

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:padding="6dip"

android:scrollbarAlwaysDrawVerticalTrack="true">

<LinearLayoutwww.2cto.com

android:layout_width="fill_parent"

android:minWidth="240dip"

android:layout_height="wrap_content"

android:orientation="vertical"

android:padding="6dip">

<TextView

android:id="@+id/news_content"

android:textSize="16sp"

android:paddingTop="10dp"

android:layout_width="fill_parent"

android:layout_height="wrap_content"

android:gravity="center_horizontal"

android:visibility="gone"/>

</LinearLayout>

</ScrollView>

将TextView中android:layout_width="fill_parent" 改为wrap_content 就好了

摘自 水墨青花的专栏

赞助本站

人工智能实验室

相关热词: android开发 教程

AiLab云推荐
推荐内容
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港