<!--在创建xml文件的时候选择ScrollView类型-->
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content" > <!--在ScrollView中只能有一个布局-->
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="滚动视图"
android:textSize="30dp"
></TextView>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/item1"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="显示多张图"
android:textSize="30dp"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/item2"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/item3"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/item4"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/item5"
/>
</LinearLayout> </ScrollView>

android笔记---ScrollView的更多相关文章

  1. android 自定义scrollview 仿QQ空间效果 下拉伸缩顶部图片,上拉回弹 上拉滚动顶部title 颜色渐变

    首先要知道  自定义scrollview 仿QQ效果 下拉伸缩放大顶部图片 的原理是监听ontouch事件,在MotionEvent.ACTION_MOVE事件时候,使用不同倍数的系数,重置布局位置[ ...

  2. Android自定义ScrollView分段加载大文本数据到TextView

    以下内容为原创,转载时请注明链接地址:http://www.cnblogs.com/tiantianbyconan/p/3311658.html 这是我现在碰到的一个问题,如果需要在TextView中 ...

  3. Android笔记——Android中数据的存储方式(二)

    我们在实际开发中,有的时候需要储存或者备份比较复杂的数据.这些数据的特点是,内容多.结构大,比如短信备份等.我们知道SharedPreferences和Files(文本文件)储存这种数据会非常的没有效 ...

  4. Android自定义ScrollView实现一键置顶功能

    效果图如下: (ps:动态图有太大了,上传不了,就给大家口述一下要实现的功能吧) 要实现的功能:当ScrollView向上滑动超过一定距离后,就渐变的出现一个置顶的按钮,当滑动距离小于我们指定的距离时 ...

  5. Android 自定义ScrollView ListView 体验各种纵向滑动的需求

      分类: [android 进阶之路]2014-08-31 12:59 6190人阅读 评论(10) 收藏 举报 Android自定义ScrollView纵向拖动     转载请标明出处:http: ...

  6. Android笔记:触摸事件的分析与总结----TouchEvent处理机制

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://glblong.blog.51cto.com/3058613/1559320   ...

  7. Android开发ScrollView上下左右滑动事件冲突整理一(根据事件)

    主要通过重写 onInterceptTouchEvent 事件来解决,代码如下: package com.cm.android.pad.view.itemView; import android.co ...

  8. Android弹性ScrollView

    开袋即食 import android.content.Context; import android.graphics.Rect; import android.util.AttributeSet; ...

  9. Android对ScrollView滚动监听,实现美团、大众点评的购买悬浮效果

    转帖请注明本文出自xiaanming的博客(http://blog.csdn.net/xiaanming/article/details/17761431),请尊重他人的辛勤劳动成果,谢谢! 我之前写 ...

随机推荐

  1. 创建第一个servlet程序--HelloServlet

    这篇文章是用来纪念我第一次创建一个Servlet程序,步骤我会写得详细点,也可以参考一下,后续我会将SpringMVC 跟ssh的搭建分别更新(ps:不忙的话我会更新) 工具:java jdk 1.6 ...

  2. HotSpot学习(一)——如何下载openjdk源码

    下载页地址: https://download.java.net/openjdk/jdk7 或者 https://download.java.net/openjdk/jdk8 这里以jdk8的页面为例 ...

  3. 【laravel5.4】php artisan 常用命令

        路由缓存:/www/wd***/php/bin/php artisan route:cache 查看全部路由并输出到txt文件:/www/wd***/php/bin/php artisan r ...

  4. 解决ubuntu13.04 有线网络 时常掉线的问题

    不少朋友在升级或新装ubuntu13.04时遇到有线老掉线的问题:连上不到半分钟又掉了,把网线重新拔插一下又可以接着又掉..基本不能正常使用或工作,很恼人的问题. 网上这方面的资料很少现在我把解决方法 ...

  5. Alias Method for Sampling 采样方法

    [Alias Method for Sampling]原理 对于处理离散分布的随机变量的取样问题,Alias Method for Sampling 是一种很高效的方式. 在初始好之后,每次取样的复杂 ...

  6. SaltStack 入门到精通第二篇:Salt-master配置文件详解

    SaltStack 入门到精通第二篇:Salt-master配置文件详解     转自(coocla):http://blog.coocla.org/301.html 原本想要重新翻译salt-mas ...

  7. Nginx对某个目录或整个网站进行登录认证的方法

    比如要对 网站目录下的 test 文件夹 进行加密认证 首先需要在opt 的主目录中 /opt/ 创建一个新文件 htpasswd此文件的书写格式是用户名:密码每行一个账户并且 密码必须使用函数 cr ...

  8. 【Spring】SpringMVC之详解AOP

    1,AOP简介 Aspect Oriented Programming  面向切面编程.AOP还是以OOP为基础,只不过将共同逻辑封装为组件,然后通过配置的方式将组件动态切入到原有组件中.这样做的有点 ...

  9. ActiveX IE保护模式下的低权限操作路径及Windows操作系统特殊路径

    参考理解IE保护模式:https://blog.csdn.net/xt_xiaotian/article/details/5336809 文件帮助类: public class FileHelp { ...

  10. python学习笔记——提取网页中的信息正则表达式re

    被用来检索\替换那些符合某个模式(规则)的文本,对于文本过滤或规则匹配,最强大的就是正则表达式,是python爬虫里必不可少的神兵利器. 1 正则表达式re基本规则 [0-9] 任意一个数字,等价\d ...