码迷,mamicode.com
首页 > 其他好文 > 详细

2015-5-5-笔记

时间:2015-05-05 12:14:17      阅读:111      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!