解决bringChildToFront/bringToFront不起作用的问题
2015-04-09 20:23
1011 查看
有时候需要在FrameLayout中对子控件进行上下层的调整,我们大多数时候都是用来bringChildToFront、bringToFront这两个方法来实现。
然后在部分机型和部分系统中,bringChildToFront、bringToFront两个方法并不起作用,原因估计是显示缓存的一个bug,导致视图不能及时更新。为了解决这个问题,我们可以强制刷新布局来显示最新的视图。方法如下:
然后在部分机型和部分系统中,bringChildToFront、bringToFront两个方法并不起作用,原因估计是显示缓存的一个bug,导致视图不能及时更新。为了解决这个问题,我们可以强制刷新布局来显示最新的视图。方法如下:
fatherLayout.bringChildToFront(childLayout); fatherLayout.updateViewLayout(childLayout, childLayout.getLayoutParams());
相关文章推荐
- android GridView 在TV上解决item放大时候,被其他item遮挡,单纯使用bringToFront无法解决的问题
- android studio 启动时候报:java.lang.IllegalStateException: failed to create a child event loop 问题解决
- 解决 Failed to start LSB: Bring up/down networking 有关问题
- idea中error:failed to create a child event loop问题解决
- iOS7 bringSubviewToFront 和frame问题
- 使用bringChildToFront()将view显示在屏幕最前方
- DelphiXE7 FMX 多Panel bring to front置前遇到的问题
- 解决FLAG_ACTIVITY_REORDER_TO_FRONT方式启动Activity,按返回键会出现卡死(ANR)的问题
- 使用bringChildToFront()将view显示在屏幕最前方
- idea 中error:failed to create a child event loop问题解决
- 问题解决:iOS6下shouldAutorotateToInterfaceOrientation不起作用,屏幕旋转同时支持iOS5和iOS6
- bringChildToFront()将view显示在屏幕最前方
- 解决 AutoMapper ProjectTo 不起作用的问题
- View.bringToFront()方法 ViewGroup.bringChildToFront(View child)将view显示在视图的最顶层
- 问题解决:iOS6下shouldAutorotateToInterfaceOrientation不起作用,屏幕旋转同时支持iOS5和iOS6
- 使用bringChildToFront()将view显示在屏幕最前方
- 三种方法解决 Failed to start LSB: Bring up/down networking 问题
- 关于“Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.”问题的解决
- Unable to Log You on Because of an Account Restriction问题的解决。
- Hibernate 级联保存时 偶尔会出现 "id to load is required for loading" 问题的解决办法