随笔 - 299  文章 - 0  评论 - 0  阅读 - 6322 

android实现屏幕上下滚动有个ScrollView控件,拖动控件自带LinearLayout, 把需要滑动的页面放在LinearLayout其下即可。

<ScrollView
android:id="@+id/scrollView2"
android:layout_width="fill_parent"
android:layout_height="wrap_content">

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">


</LinearLayout>
</ScrollView>
要注意的是:底部控件高度不要设置具体值,设置具体高度滑动无效果。让它wrap_content自适应即可。

posted on   杨申龙  阅读(109)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
点击右上角即可分享
微信分享提示