<!--在创建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. tomcat的war由于损坏不能解压导致的服务不能启动

    问题描述: Tomcat启动,提示异常,服务自动释放! INFO: Starting Servlet Engine: Apache Tomcat/ Sep , :: PM org.apache.cat ...

  2. Ubuntu x86-64汇编(6)

    寻址方式 Addressing Modes 地址和值 Addresses vs Values 在64bit架构中, 地址是64bit. 访问内存内容的唯一方式就是通过方括号, 不加方括号读取的只是地址 ...

  3. Ubuntu16.04下的英文词典Artha

    地址: http://artha.sourceforge.net  http://artha.sourceforge.net/wiki/index.php/Download 在Ubuntu下可以直接安 ...

  4. hdu 4122 Alice&#39;s mooncake shop (线段树)

    题目大意: 一个月饼店每一个小时做出月饼的花费不一样. 储存起来要钱.最多存多久.问你把全部订单做完的最少花费. 思路分析: ans = segma( num[]*(cost[] + (i-j)*s) ...

  5. iOS中消息传递方式

    iOS中消息传递方式 在iOS中有很多种消息传递方式,这里先简单介绍一下各种消息传递方式. 1.通知:在iOS中由通知中心进行消息接收和消息广播,是一种一对多的消息传递方式. NSNotificati ...

  6. xtrabackup部分备份数据库 Partial Backups

    官方文档: 部分备份: http://www.percona.com/doc/percona-xtrabackup/2.1/innobackupex/partial_backups_innobacku ...

  7. C/C++语言中闭包的探究及比较

    这里主要讨论的是C语言的扩展特性block.该特性是Apple为C.C++.Objective-C增加的扩展,让这些语言可以用类Lambda表达式的语法来创建闭包.前段时间,在对CoreData存取进 ...

  8. hibernate的native sql查询

    在我们的hibernate中,除了我们常用的HQL查询以外,还非常好的支持了原生的SQL查询,那么我们既然使用了hibernate,为什么不都采用hibernate推荐的HQL查询语句呢?这是因为HQ ...

  9. Intellij idea 配置热部署

    1. 采用外部tomcat的配置 1)打开右上角Run的Edit Configuration进入Tomcat配置选项页面 2)将On frame   deactivation选项更改为 Update ...

  10. spring中InitializingBean接口使用理解(转)

    InitializingBean接口为bean提供了初始化方法的方式,它只包括afterPropertiesSet方法,凡是继承该接口的类,在初始化bean的时候会执行该方法. 测试程序如下: imp ...