android view在scrollview不显示,android – ScrollView不显示内容

在Android开发中,遇到ScrollView无法显示其内的LinearLayout及TextViews的问题。布局XML代码显示了一个包含多个Test文本的线性布局,该布局被放置在ScrollView内。可能的原因包括:布局高度设置不当、滚动条淡入淡出时间设置、内容区域未超过屏幕高度等。解决此类问题通常需要检查父组件高度、子组件布局和内容填充情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

有人可以解释为什么scrollview没有显示他的孩子元素?

我在一个linearlayout垂直内部有很多textview,这个linearlayout在scrollview中…

但我没有看到任何scrollview既没有textviews ..

这是XML布局

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="match_parent"

android:layout_height="match_parent" >

android:id="@+id/description"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_above="@+id/scrollViewCheck"

android:gravity="center"

android:padding="10dip"

android:text="Pick which items you want to count"

android:textAppearance="?android:attr/textAppearanceMedium" >

android:id="@id/scrollViewCheck"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_above="@+id/bottomSettings"

android:scrollbarFadeDuration="0" >

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:gravity="center_horizontal"

android:orientation="vertical" >

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_centerHorizontal="true"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:layout_centerHorizontal="true"

android:text="Test"

android:textAppearance="?android:attr/textAppearanceMedium" />

android:id="@id/bottomSettings"

android:layout_width="fill_parent"

android:layout_height="wrap_content" >

android:id="@+id/timeButton"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:text="Choose Count Time" />

android:layout_width="match_parent"

android:layout_height="match_parent"

android:layout_below="@id/timeButton"

android:orientation="horizontal" >

android:layout_width="0dip"

android:layout_height="wrap_content"

android:layout_weight="1"

android:text="Back" />

android:layout_width="0dip"

android:layout_height="wrap_content"

android:layout_weight="1"

android:text="Start" />

提前致谢 ?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值