FrameLayout 的子View 设置 top 值
来源:互联网 发布:banner图片轮播js代码 编辑:程序博客网 时间:2024/05/16 07:28
FrameLayout 的子View 设置 top 值。
可以通过重写FrameLayout 的 onLayout 方法来实现。
TopContentHeight 是top的值。
@Overrideprotected void onLayout(boolean changed, int left, int top, int right,int bottom) {super.onLayout(changed, left, top, right, bottom);if(changed) {final int count = getChildCount();for(int i = 0; i < count; i++) {View child = getChildAt(i);if(child instanceof FullScreenHandlerView) {int width = child.getMeasuredWidth(); int height = child.getMeasuredHeight();child.layout(0, TopContentHeight, width, TopContentHeight + height);break;}}Log.i(LOGTAG, "changed========="+changed);}}
- FrameLayout 的子View 设置 top 值
- 如何addView时 , 设置framelayout的子View的位置
- 编码设置FrameLayout子View的layout_gravity,gravity
- Android4.0以下系统FrameLayout布局的子View设置的Margin常常出现失败的情况
- Android 4.0以下系统FrameLayout 子View setMargin失效
- iOS设置父view的透明度,使子view不透明
- Android兼容性问题 -- FrameLayout中View设置margin无效
- 如何解决子div设置margin-top时影响父div的margin-top
- 欢迎界面的 layout/FrameLayout设置
- Android CardView设置成普通的Framelayout
- HorizontalScrollView动态添加子view,并且设置每个子view的点击事件
- RelativeLayout设置子view位置
- Linearlayout 中设置子View之间的空白间距
- ScrollView设置子View的高度为match_parent,无效
- Framelayout里view重叠时的刷新问题
- 利用FrameLayout连接一组view实现流畅的左右滑动
- android FrameLayout响应了下层view的点击事件
- android FrameLayout响应了下层view的点击事件
- oracle 分析函数over
- xen 下电流程分析(1)
- Eclipse 提示:The connection to adb is down, and a severe error has occured.
- 几种常用的函数调用约定!
- 函数后面加一个const的作用
- FrameLayout 的子View 设置 top 值
- struts2系统提供的校验器常用属性校验说明
- C#集合
- Linux Checkpoint/Restart
- Spring学习笔记(六)注解方式配置事物
- 学习新技术的10个建议
- Error opening file for COM ocean loading correction (Name otlcmc.dat)
- 软件工程师的务实职业生涯规划
- 'make menuconfig' requires the ncurses libraries