如何在Android中垂直滚动活动

如何在Android中垂直滚动活动,第1张

概述我有以下布局: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:i 我有以下布局:
<linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"  androID:orIEntation="vertical"  androID:layout_wIDth="fill_parent"  androID:layout_height="fill_parent"  androID:isScrollContainer="true">   <gallery androID:ID="@+ID/gallery"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:gravity="bottom"/>  <linearLayout androID:ID="@+ID/chart" androID:orIEntation="horizontal"    androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"              androID:layout_weight="1" /></linearLayout>

在运行时填充图库,当用户点击某个项目时,我会用一系列图像填充linearLayout.
我想垂直滚动,但如果我在用户点击图库时添加ScrollVIEw,则不再填充linearLayout.

这是正常的吗?如何添加垂直滚动

谢谢和问候
C.

解决方法
<linearLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"  androID:orIEntation="vertical"  androID:layout_wIDth="fill_parent"  androID:layout_height="fill_parent"><ScrollVIEw androID:ID="@+ID/ScrlVIEw" androID:layout_wIDth="fill_parent" androID:layout_height="fill_parent" > <linearLayout androID:ID="@+ID/layoutForScroll" androID:orIEntation="vertical"    androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"            >   <gallery androID:ID="@+ID/gallery"    androID:layout_wIDth="fill_parent"    androID:layout_height="wrap_content"    androID:gravity="bottom"/>  <linearLayout androID:ID="@+ID/chart" androID:orIEntation="horizontal"    androID:layout_wIDth="fill_parent" androID:layout_height="wrap_content"              androID:layout_weight="1" /></linearLayout></ScrollVIEw></linearLayout>
总结

以上是内存溢出为你收集整理的如何在Android中垂直滚动活动全部内容,希望文章能够帮你解决如何在Android中垂直滚动活动所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1136693.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-30
下一篇2022-05-30

发表评论

登录后才能评论

评论列表(0条)

    保存