2015-5-5-笔记

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)

 

posted @ 2015-05-05 10:29  beyondbycyx  阅读(109)  评论(0编辑  收藏  举报