在低版本Android中fragment会overlay ActionBar区域
来源:互联网 发布:mac 转码软件 编辑:程序博客网 时间:2024/04/29 13:13
1 问题
It works like a charm on android 4.0+ and also on android 2.3 with a normal Activity that has setContentView in onCreate, but when the activity is loading an Fragment in onCreate the ActionBar gets overlapped with the content of my layout. At all other scenarios the ActionBar works well.2 解释
R.id.action_bar_activity_content is a new id used in layout for displaying app content, it would appear that it replace android.R.id.content when you use support v7 appcompat ActionBarActivity.3 解决方案
public static int getContentViewCompat() { return Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB ? android.R.id.content : android.support.v7.appcompat.R.id.action_bar_activity_content; }
感谢大神:
https://code.google.com/p/android/issues/detail?id=58108
0 0
- 在低版本Android中fragment会overlay ActionBar区域
- 低版本中使用ActionBar
- android: 在fragment中添加actionbar, menu
- android中ActionBar +Fragment
- android兼容低版本Fragment
- Android Fragment兼容低版本
- 低版本android如何使用ActionBar
- android中在fragment画面添加actionbar(标题栏)
- 在低于android 5.0的版本中ActionBar不显示
- 低版本的android系统如何使用ActionBar
- android ActionBar 兼容低版本之搜索功能
- Android 在低版本sdk中没有getSupportedPreviewFrameRates函数怎么办?
- Android_低版本使用ActionBar
- Android_低版本使用ActionBar
- Android_低版本使用ActionBar
- Android_低版本使用ActionBar
- Android_低版本使用ActionBar
- Android_低版本使用ActionBar
- iOS小技巧--iOS 7简单适配
- tomcat conf目录下web.xml tomcat-users.xml server.xml context.xml这四个文件的作用
- jQuery Mobile 列表视图
- java格式化各类数字显示
- Jmeter中文乱码的问题
- 在低版本Android中fragment会overlay ActionBar区域
- Cracking the coding interview--Q8.3
- 参加.Net培训就选择广州传智播客
- exp/imp三种模式——完全、用户、表
- hdu-1232 畅通工程
- JMS的基本概念
- qte for arm的编译过程
- 其实你是我最最最最最爱的女人
- Struts result param详细设置