ScrollView HorizontalScrollView
可垂直或水平滚动的列表
ScrollView & HorizontalScrollView内部只能有一个直接的子元素,
<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <Button android:id="@+id/button_1" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button1"/> <Button android:id="@+id/button_2" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TEST" /> <HorizontalScrollView android:layout_width="wrap_content" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button1TESTTEST"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TESTTESTTEST" /><Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="ButTESTTESTTESTton1"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TETESTTESTTESTST" /> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Button1TESTTEST"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TESTTESTTEST" /><Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="ButTESTTESTTESTton1"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="TETESTTESTTESTST" /> </LinearLayout> </HorizontalScrollView> </LinearLayout> </ScrollView>
转载于:https://www.cnblogs.com/AppTester/p/10511341.html
ScrollView HorizontalScrollView相关推荐
- ScrollView/HorizontalScrollView常用技巧,附源码
ScrollView是ViewGroup的派生类,ViewGroup是View的派生类. + 屏幕大小总是有限制的,对移动设备来说更是如此.当有很多内容需要显示的时候,一屏显示不完时,就需 ...
- ScrollView和HorizontalScrollView常用属性,及禁止滑动
常用属性:详见注释 activity_main_28 <?xml version="1.0" encoding="utf-8"?> <Line ...
- android 高仿苹果listview,高仿 MIUI 弹性拉伸 view ,支持RecyclerView, ListView, GridView, ScrollView ......
首先申明:这个库是基于 Over-Scroll Elasticity 支持 Android 原生控件 RecyclerView, ListView, GridView, ScrollView - 这个 ...
- android自定义View-垂直滚动的TextView
其实要让TextView能够滚动,可以使用ScrollView/HorizontalScrollView或者设置ScrollingMovementMethod来实现. 点击查看:android实现Te ...
- 【练习】ViewPager标签滑动
效果图: 布局: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:a ...
- android 侧滑删除功能,200行代码让你在Android中完美实现iOS版侧滑删除效果
使用几个月的IOS之后,发现IOS中侧滑删除俺就 大家好,自己开始学习Android已经差不多半年了吧,前前后后看了不少的博客获益匪浅.渐渐的随着技术的提升,慢慢感觉网上其它的一些功能的实现又不是那么 ...
- ListView上拉加载,下拉刷新 PullToRefresh的使用
PullToRefresh是一套实现非常好的下拉刷新库,它支持: ListView ExpandableListView GridView WebView ScrollView HorizontalS ...
- Android开源库
PagerSlidingTabStrip 配合ViewPager使用的交互式页面指示器控件. leakcanary 它是一个Android和Java的内存泄露检测库,可以大幅度减少了开发中遇到的OOM ...
- Android基本组件及使用
第一个月交互式视觉设计 第一单元 常用的ADB命令 1:adb start-server 启动adb进程 2:adb kill-server 杀死adb进程 3:adb devices 显示当前运行的 ...
最新文章
- python plot 坐标轴范围,Python,Matplotlib,子图:如何设置轴范围?
- 理解UI线程——SWT, Android, 和Swing的UI机理
- dao层通用封装_DAO层–救援通用
- 《DBNotes:single_table访问方法、MRR多范围读取优化、索引合并》
- Git的使用的简单介绍
- 8.修改、扩展、重写Magento代码
- Unity3D之创建3D游戏场景
- 《编译原理》画 DAG 图与求优化后的 4 元式代码- 例题解析
- 有道云笔记android手写,有道云笔记手写记事 保留笔迹原汁原味
- 《童梦奇缘-梦幻般的羁绊》第七章-流火
- 产品读书《长尾理论》
- 拜尔滤色拜尔滤色镜_如何在iPhone或iPad上启用滤色器以方便眼睛阅读
- Android MTK系统编译与调试命令
- 给RTL8111网卡固定MAC地址的一种方法
- 4 win10环境下+vs2017+pcl1.9环境配置
- 谷歌优化排名怎么做?Google SEO怎么优化?
- 仿造问卷星--开发一套调查问卷设计工具(3/3)--完整流程
- oracle 数据库中文简体繁体乱码
- java微信二维码第三方后台登陆实现 ( 一 )
- 卡耐基·梅隆大学教授金出武雄:对户外机器人三十年来的探索|CCF-GAIR 2017
热门文章
- 计算机专业多媒体技术学什么,计算机多媒体技术需要学习哪些知识
- 二叉树的层序遍历—leetcode102
- 全排列—leetcode46
- mysql providername,c#访问各数据库的providerName各驱动
- VMware+Win7+windbg 双机调试
- linux下安装Apache,php,Mysql
- const_iterator简单介绍
- c++中lambda表达式用法
- apmserv mysql密码_apmserv中修改mysql的root与phpmyadmin密码方法介绍_PHP教程
- 上海经济适用房申请条件