可垂直或水平滚动的列表

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. jsp内置对象-session对象

    一.session概述 隐含对象session是javax.servlet.http.HttpSession接口实现类的对象,用于保存用户的状态信息. 在web开发中,服务器为每个用户浏览器创建一个会 ...

  2. Windows下创建ArcGIS Server站点

    原创文章,转载须标明出处自: https://www.cnblogs.com/gisspace/p/8126261.html ------------------------------------- ...

  3. 项目实战工具类(二):ZipUtils(压缩/解压缩文件相关)

    import android.content.Context; import android.util.Log; import java.io.File; import java.io.FileInp ...

  4. JS 字符串对象 数组对象 函数对象 函数作用域

    一.内置对象 object对象:ECMAScript 中的所有对象都由这个对象继承而来:Object 对象中的所有属性和方法都会出现在其他对象中 ToString() : 返回对象的原始字符串表示.V ...

  5. HttpClient 报错 Invalid cookie header, Invalid 'expires' attribute: Thu, 01 Jan 1970 00:00:00 GMT

    今天在给我姐夫写一个 QQ 自动加好友的程序,但是在 HttpClient 登陆 QQ 的时候报了一个错: -- ::] - Invalid cookie header: Jan :: GMT -- ...

  6. DEDECMS 漏洞修复方案

    目录 DEDECMS支付模块注入漏洞 漏洞文件: /include/payment/alipay.php 漏洞描述: 对输入参数$_GET['out_trade_no']未进行严格过滤 修复方案: 对 ...

  7. GDB调试指南-变量查看

    前言 在启动调试以及设置断点之后,就到了我们非常关键的一步-查看变量.GDB调试最大的目的之一就是走查代码,查看运行结果是否符合预期.既然如此,我们就不得不了解一些查看各种类型变量的方法,以帮助我们进 ...

  8. SQL 语法使用

    SQL 语句 语句 语法 AND / OR SELECT column_name(s)FROM table_nameWHERE conditionAND|OR condition ALTER TABL ...

  9. centos7的内核区别

    最近重新搭建环境准备测试一些东西,在网上随意下载了一个镜像,名字叫做:CentOS-7-i386-Everything-1810 下载完之后开始做实验安装软件的时候发现一直报错:[Errno 14] ...

  10. DRF限制访问频次

    官方文档:https://www.django-rest-framework.org/api-guide/throttling/ 1.什么场景下需要限制访问频次呢? 1)防爬虫:爬虫可能会在短时间内大 ...