首页 > 其他 > 详细

2015-5-5-笔记

时间:2015-05-05 12:13:01      阅读:170      评论:0      收藏:0      [点我收藏+]

1.ScrollView,它继承自FrameLayout,所以它是一种特殊类型的FrameLayout,

因为它可以使用用户滚动显示一个占据的空间大于物理显示的视图列表。值得注意的是,

ScrollView只能包含一个子视图或视图组,在实际项目中,通常包含的是一个垂直的LinearLayout。

值得注意的是,ScrollView不能和ListView一起使用,因为ListView已经对垂直方向的滚动做了处理

关键字:FrameLayout,滚动显示

动态的效果展示---使用ListView。
固定效果展示---使用ScrollView。

2.<include/>和<merge/>标签 

   include:指定另一个Layout,即实现嵌套Layout

   merge:没有ViewGrouproot,即消除Layout根元素,而使用上一个ViewGrouproot(根元素)。

  注意:

     When inflating a layout starting with a <merge />, you must specify a parent ViewGroup and you must set attachToRoot to true 

     (see the documentation for inflate(int, android.view.ViewGroup, boolean) method)

 

2015-5-5-笔记

原文:http://www.cnblogs.com/beyondbycyx/p/4478466.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!