1.介绍

2.使用技巧

3.xml文件代码

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"> <ScrollView
android:layout_width="match_parent"
android:layout_height="300dp"> <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"> <TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" /> <ImageView
android:id="@+id/imageView"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img01" />
<ImageView
android:id="@+id/imageView2"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img02" /> <ImageView
android:id="@+id/imageView3"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img03" /> <ImageView
android:id="@+id/imageView4"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img04" /> <ImageView
android:id="@+id/imageView5"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img05" />
<ImageView
android:id="@+id/imageView6"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img06" />
<ImageView
android:id="@+id/imageView7"
android:layout_gravity="center"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_weight="1"
app:srcCompat="@mipmap/img07" /> </LinearLayout>
</ScrollView> <HorizontalScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"> <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"> <TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" /> <ImageView
android:id="@+id/imageView9"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img01" /> <ImageView
android:id="@+id/imageView10"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img02" /> <ImageView
android:id="@+id/imageView11"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img03" /> <ImageView
android:id="@+id/imageView12"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img04" /> <ImageView
android:id="@+id/imageView13"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img05" /> <ImageView
android:id="@+id/imageView14"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img06" /> <ImageView
android:id="@+id/imageView15"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="center"
android:layout_weight="1"
app:srcCompat="@mipmap/img07" />
</LinearLayout>
</HorizontalScrollView> </LinearLayout>

Android 滚动视图(ScollView)的更多相关文章

  1. Anroid组件滚动视图(ScollView)简单使用

    ScollView应用展示 在xml文件中添加滚动视图 activity_main.xml <?xml version="1.0" encoding="utf-8& ...

  2. Android——滚动视图(ScrollView)图片视图(ImageView)、状态开关按钮(ToggleButton)、时钟

    xml <?xml version="1.0" encoding="utf-8"?> <!--滚动视图--> <ScrollVie ...

  3. android 滚动视图(ScrollView)

    为了可以让内嵌布局管理器之中加入多个显示的组件,而且又保证程序不这么冗余,所以可以通过 Activity程序进行控制,向内嵌布局管理器中添加多个组件. ScrollView提供一个显示的容器,可以包含 ...

  4. Android 自学之滚动视图ScrollView

    滚动视图ScrollView由FarmeLayout派生而出,他就是一个用于为普通组件添加垂直滚动条的组件:ScrollView里面最多包含一个组件,而ScrollView的作用就是为该组件添加一个垂 ...

  5. Android应用--新浪微博客户端新特性滚动视图和启动界面实现

    新浪微博客户端新特性滚动视图和启动界面实现 2013年8月20日新浪微博客户端开发之启动界面实现 前言: 使用过新浪微博客户端的童鞋都清楚,客户端每一次升级之后第一次启动界面就会有新特性的介绍,用户通 ...

  6. 【Android】10.5 滚动视图(RecyclerView)

    分类:C#.Android.VS2015: 创建日期:2016-02-19 一.简介 滚动视图(RecyclerView)的用法与布局控件的用法类似,唯一不同的是,所有布局控件中都可以包含多个组件,而 ...

  7. 从零開始学android&lt;ScrollView滚动视图.十八.&gt;

    因为手机屏幕的高度有限.所以假设面对组件要显示多组信息的时候,ScrollView视图(滚动视图)能够有效的安排这些组件,浏览时能够自己主动的进行滚屏的操作. android.widget.Scrol ...

  8. Android零基础入门第61节:滚动视图ScrollView

    原文:Android零基础入门第61节:滚动视图ScrollView 前面几期学习了ProgressBar系列组件.ViewAnimator系列组件.Picker系列组件和时间日期系列组件,接下来几期 ...

  9. Android中通过Java代码实现ScrollView滚动视图-以歌词滚动为例

    场景 实现效果如下 注: 博客: https://blog.csdn.net/badao_liumang_qizhi 关注公众号 霸道的程序猿 获取编程相关电子书.教程推送与免费下载. 实现 将布局改 ...

随机推荐

  1. Python中__new__与__init__介绍

    在python2.x中,从object继承得来的类称为新式类(如class A(object))不从object继承得来的类称为经典类(如class A()) 新式类跟经典类的差别主要是以下几点: 1 ...

  2. 单机配置tomcat 8 集群

    如何能在集群中的多个节点之间保持数据的一致性,会话(Session)信息是这些数据中最重要的一块. 本文当采用tomcat默认集群配置(<Cluster className="org. ...

  3. Ubuntu 源使用帮助

    地址 https://mirrors.ustc.edu.cn/ubuntu/ 说明 Ubuntu 软件源 收录架构 AMD64 (x86_64), Intel x86 其他架构请参考 Ubuntu P ...

  4. Solidity payable 方法表现

    pragma solidity ^; contract Person { string public name; uint age; uint private weight; string inter ...

  5. Luogu 4438 [HNOI/AHOI2018]道路

    $dp$. 这道题最关键的是这句话: 跳出思维局限大胆设状态,设$f_{x, i, j}$表示从$x$到根要经过$i$条公路,$j$条铁路的代价,那么对于一个叶子结点,有$f_{x, i, j} = ...

  6. jquery数组拼接

    var a=[]; var c=[80,90,70,100] var b={'张三':19,'成绩':c}; a.push(b); console.log("测试案例",a); 同 ...

  7. ios7适配--隐藏status bar

    //viewDidload if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) { // iOS 7 ...

  8. 关于.net DateTime 的一些事儿

    最近开发的过程中遇到一种情况,在.net 程序中获取的Datetime格式的时间,在存入SQL server中,毫秒部分丢失. 这个是个很奇怪的状况,因为在Debug的时候,Datetime的变量的确 ...

  9. android获取USB设备的名称

    1.注释内 .是三星设备可能不支持,需要更换的代码. 2.mUsbManager.是getSystemService(Context.USB_SERVICE)获的. 3. 从stackoverflow ...

  10. Js 获取屏幕坐标

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...