可垂直或水平滚动的列表

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>

ScrollView & HorizontalScrollView的更多相关文章

  1. Android开发工程师文集-Fragment,适配器,轮播图,ScrollView,Gallery 图片浏览器,Android常用布局样式

    Android开发工程师文集-Fragment,适配器,轮播图,ScrollView,Gallery 图片浏览器,Android常用布局样式 Fragment FragmentManager frag ...

  2. Android ViewPager+HorizontalScrollView实现标题栏滑动(腾讯新闻)

    1) ViewPager提供了左右滑动切换页面的方法,但是它所提供的标题只是无语,估计没有真正的项目会照搬拿过来;并且它只能一页一页滑,我想直接查看最后一页要滑半天; 2) 看了腾讯新闻客户端感觉体验 ...

  3. ScrollView+RadioGroup

    今天要分享一下关于动态添加RadioButton的东西: 要实现的效果就是,这个控件可以左右滑动,里面的按钮都是互斥的,类似RadioButton,我的第一反应就是用ScrollView+RadioG ...

  4. 【Android UI】侧滑栏的使用(HorizontalScrollView控件的使用)

    主要的用到的控件:HorizontalScrollView 主要的功能:把几张图片解析成一张图片,在一个容器中呈现. 布局文件xml side_bar_scollview.xml//显示view的容器 ...

  5. Xamarin. Android实现下拉刷新功能

    PS:发现文章被其他网站或者博客抓取后发表为原创了,给图片加了个水印 下拉刷新功能在安卓和iOS中非常常见,一般实现这样的功能都是直接使用第三方的库,网上能找到很多这样的开源库.然而在Xamarin. ...

  6. ListView上拉加载,下拉刷新 PullToRefresh的使用

    PullToRefresh是一套实现非常好的下拉刷新库,它支持:ListViewExpandableListViewGridViewWebViewScrollViewHorizontalScrollV ...

  7. 【练习】ViewPager标签滑动

    效果图: 布局: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:a ...

  8. 【Android - 进阶】之自定义视图浅析

    1       概述 Android自定义View / ViewGroup的步骤大致如下: 1) 自定义属性: 2) 选择和设置构造方法: 3) 重写onMeasure()方法: 4) 重写onDra ...

  9. Java-Android 之出滚动条和卷轴页面

    <?xml version="1.0" encoding="utf-8"?> <HorizontalScrollView xmlns:andr ...

随机推荐

  1. Ubuntu18.04下安装配置MongoDB4.0.6

    搭建MongoDB环境 安装MongoDB 1.下载安装包 MongoDB 提供了 linux 各发行版本 64 位的安装包,你可以在官网下载安装包. 下载地址:https://www.mongodb ...

  2. vue路由懒加载 及import

  3. Django 无名参数与有名参数

    无名参数 配置 urls ,我们需要导入 url 模块,以()定义一个无名的变量 from django.contrib import admin from django.urls import pa ...

  4. 清理mac的硬盘空间,清理Xcode,清除“其他”

    下面是一些清理的方法:打开Finder使用快捷键command+shift+g输入路径即可进入该文件夹 1. 移除DerivedData,建议定期清理,会重新生成 此文件夹内是模拟器运行每个APP生成 ...

  5. Simulink 产品说明

    Simulink 产品说明 仿真和基于模型的设计 Simulink® 是一个模块图环境,用于多域仿真以及基于模型的设计.它支持系统级设计.仿真.自动代码生成以及嵌入式系统的连续测试和验证.Simuli ...

  6. 【Java】itext根据模板生成pdf(包括图片和表格)

    1.导入需要的jar包:itext-asian-5.2.0.jar itextpdf-5.5.11.jar. 2.新建word文档,创建模板,将文件另存为pdf,并用Adobe Acrobat DC打 ...

  7. 教你一步永久激活WebStorm2018

    工欲善其事必先利其器,我们在开发过程中,编辑器是我们提高开发效率及生产必备的工具,如何发现一个高效好用的编辑器是程序员必备的技能之一. 前端开发有众多编辑器 sublime.vscode.webstr ...

  8. js坚持不懈之11:focus()方法

    主要是用于获取焦点,自动把光标放到此组件上面,无须用户再次操作. 示例: <html> <head> <p>1. 长度限制</p> <form n ...

  9. js关于new Date() 日期格式

    下面是关于Date的对象 var oDay = new Date(); oDay.getYear(); //当前年份 oDay.getFullYear(); //完整的年月日(xx年,xx月,xx日) ...

  10. Linux:Day17(下) openssl

    Linux Services and Security OpenSSL OpenSSH dns:bind web:http,httpd(apache),php,mariadb(mysql) lamp ...