摘要: 一、主要步骤 ①、调用ListView的addHeaderView(),创建一个与Title一样高的View,这样ListView就不会刚开始被遮盖了 ②、调用ListView的setOnTouchEvent(),判断是上划还是下滑,上划隐藏,下滑显示。 ③、之后调用ObjectAnimation对 阅读全文
posted @ 2016-05-18 20:50 技术丶从积累开始 阅读(691) 评论(0) 推荐(0) 编辑
摘要: 1.设置项目分割功能 2.隐藏滚动条 3.指定具体显示的item 4.动态修改ListView 注:传进adapter的数据List是同一个List(指针不能变),否则无法实现效果 5.处理空的ListView ListView提供了setEmptyView()的方法,我们可以给ListView设置 阅读全文
posted @ 2016-05-18 19:50 技术丶从积累开始 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1、在ViewGroup中使用onLayout()中,获取子元素的width and height,不能用getWidth()/getHeight 必须使用getMeasureWidth()/Height() 翻阅Android开发艺术探索发现,getWidth()/height()是在onLayo 阅读全文
posted @ 2016-05-18 19:17 技术丶从积累开始 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 一、LinearGradient 步骤:①、创建LinearGradient 步骤 ②、将其加入到Paint 步骤一: 构造LinearGradient的参数 public LinearGradient (float x0, float y0, float x1, float y1, int[] c 阅读全文
posted @ 2016-05-18 11:03 技术丶从积累开始 阅读(194) 评论(0) 推荐(0) 编辑