0
点赞
收藏
分享

微信扫一扫

Android——ScrollView的使用,屏幕显示不下时,出现滑动显示效果


【使用说明】布局文件的根布局使用ScrollView,垂直滚动,HorizontalScrollView为水平滚动的,需要注意的是,ScrollView的子元素只能有一个,所以得增加一个LinearLayout布局,把其他控件放在LinearLayout中。

【代码示例】

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<LinearLayout
android:id="@+id/mine_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

其他控件


</LinearLayout>

</ScrollView>

作于201910282125,已归档

———————————————————————————————————

本文为博主原创文章,转载请注明出处!

若本文对您有帮助,轻抬您发财的小手,关注/评论/点赞/收藏,就是对我最大的支持!

祝君升职加薪,鹏程万里!

举报

相关推荐

0 条评论