Android HorizontalScrollView
2014-03-07 16:14
417 查看
今天了看了下 HorizontalScrollView 这个类,里面发现了几个好玩的东西,比如:
private OverScroller mScroller;
我印象中,有个Scroller,但是不知道还有个OverScroller,下面是这个类的解释:
/**
* This class encapsulates scrolling with the ability to overshoot the bounds
* of a scrolling operation. This class is a drop-in replacement for
* {@link android.widget.Scroller} in most cases.
*/
private EdgeEffect mEdgeGlowLeft;
看类的命名应该是“边缘效果”,查了下,才知道,原来是,比如listview,滑动到顶部的时候,拉不动了,但是有个反色,android原生系统的话,会看的特别清楚。
因为最近一直在学习View的滑动,Scroller,什么的,今天看到 HorizontalScrollView,觉得这个类对于学习自定义View简直太有用了,很多地方写的非常好,我要好好学习下这个类~
还有一个发现:在ViewGroup中类的开始说明如下,只截取了我要说明的部分:
<p>Here is a complete implementation of a custom ViewGroup that implements
* a simple {@link android.widget.FrameLayout} along with the ability to stack
* children in left and right gutters.</p>
*
* {@sample development/samples/ApiDemos/src/com/example/android/apis/view/CustomLayout.java
* Complete}
*
* <p>If you are implementing XML layout attributes as shown in the example, this is the
* corresponding definition for them that would go in <code>res/values/attrs.xml</code>:</p>
*
* {@sample development/samples/ApiDemos/res/values/attrs.xml CustomLayout}
*
* <p>Finally the layout manager can be used in an XML layout like so:</p>
*
* {@sample development/samples/ApiDemos/res/layout/custom_layout.xml Complete}
在Android4.4的ViewGroup代码中,在ApiDemos中已经加入了一个完全实现ViewGroup的例子,如果想学习自定义ViewGroup,可以看看这个例子~
参考链接:
OverScroller
http://developer.android.com/reference/android/widget/OverScroller.html http://blog.csdn.net/zouxueping/article/details/6832805 http://www.zjapk.com/thread-3893-1-1.html http://linkyan.com/2013/06/animating-scroll-gesture/ http://stackoverflow.com/questions/20329018/android-overscroller-and-performance http://www.cnblogs.com/vus520/archive/2011/11/29/2561951.html
EdgeEffect
http://blog.csdn.net/sunny2come/article/details/9820719
private OverScroller mScroller;
我印象中,有个Scroller,但是不知道还有个OverScroller,下面是这个类的解释:
/**
* This class encapsulates scrolling with the ability to overshoot the bounds
* of a scrolling operation. This class is a drop-in replacement for
* {@link android.widget.Scroller} in most cases.
*/
private EdgeEffect mEdgeGlowLeft;
看类的命名应该是“边缘效果”,查了下,才知道,原来是,比如listview,滑动到顶部的时候,拉不动了,但是有个反色,android原生系统的话,会看的特别清楚。
因为最近一直在学习View的滑动,Scroller,什么的,今天看到 HorizontalScrollView,觉得这个类对于学习自定义View简直太有用了,很多地方写的非常好,我要好好学习下这个类~
还有一个发现:在ViewGroup中类的开始说明如下,只截取了我要说明的部分:
<p>Here is a complete implementation of a custom ViewGroup that implements
* a simple {@link android.widget.FrameLayout} along with the ability to stack
* children in left and right gutters.</p>
*
* {@sample development/samples/ApiDemos/src/com/example/android/apis/view/CustomLayout.java
* Complete}
*
* <p>If you are implementing XML layout attributes as shown in the example, this is the
* corresponding definition for them that would go in <code>res/values/attrs.xml</code>:</p>
*
* {@sample development/samples/ApiDemos/res/values/attrs.xml CustomLayout}
*
* <p>Finally the layout manager can be used in an XML layout like so:</p>
*
* {@sample development/samples/ApiDemos/res/layout/custom_layout.xml Complete}
在Android4.4的ViewGroup代码中,在ApiDemos中已经加入了一个完全实现ViewGroup的例子,如果想学习自定义ViewGroup,可以看看这个例子~
参考链接:
OverScroller
http://developer.android.com/reference/android/widget/OverScroller.html http://blog.csdn.net/zouxueping/article/details/6832805 http://www.zjapk.com/thread-3893-1-1.html http://linkyan.com/2013/06/animating-scroll-gesture/ http://stackoverflow.com/questions/20329018/android-overscroller-and-performance http://www.cnblogs.com/vus520/archive/2011/11/29/2561951.html
EdgeEffect
http://blog.csdn.net/sunny2come/article/details/9820719
相关文章推荐
- Android 继承framelayout,实现ScrollView 和 HorizontalScrollView 的效果
- 【Android】无限滚动的HorizontalScrollView
- android HorizontalScrollView替代Gallery
- Android 使用HorizontalScrollView 实现Gallery效果
- android HorizontalScrollView实现滚动状态监听
- Android 自定义 HorizontalScrollView 打造再多图片(控件)也不怕 OOM 的横向滑动效果
- android中文api——HorizontalScrollView
- Android 自定义View修炼-自定义HorizontalScrollView视图实现仿ViewPager效果
- Android 自定义 HorizontalScrollView 打造再多图片(控件)也不怕 OOM 的横向滑动效果
- android ScrollView 和 HorizontalScrollView 的使用
- android Viewpager HorizontalScrollView 实现分页栏拖拽
- Android 自定义 HorizontalScrollView 打造多图片OOM 的横向滑动效果(实例代码)
- Android 自定义 HorizontalScrollView 打造再多图片(控件)也不怕 OOM 的横向滑动效果
- android中文api(85)——HorizontalScrollView
- Android 自定义 HorizontalScrollView 打造再多图片(控件)也不怕 OOM 的横向滑动效果
- 解决android中HorizontalScrollView的滚动事件与组件的Touch冲突问题
- android ScrollView 和 HorizontalScrollView 的使用
- Android 高仿 QQ5.0 侧滑菜单效果 HorizontalScrollView
- Android开发总结笔记 ScrollView和HorizontalScrollView (滚动视图) 1-3-5
- 【android】RadioGroup+RadioButton+HorizontalScrollview实现顶部横向菜单栏