Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's r
来源:互联网 发布:js触发select选择事件 编辑:程序博客网 时间:2024/05/20 11:19
Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's root element)
我的代码:
//判断退出时的定义
private static Boolean isQuit = false;
private Timer timer = new Timer();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup Container,
Bundle savedInstanceState) {
v = inflater.inflate(R.layout.setting,null);
init(v);
return v;
这不能忍,于是乎我就点进inflater方法,有道着查看了这个方法,发现有一个是两个参数的,一个是三个参数的。
inflate(
int
resource, ViewGroup root)
inflate(
int
resource, ViewGroup root,
boolean
attachToRoot)
于是乎我便修改成为下边的参数,结果一试就好了。但是具体的身为菜鸟的我真的不太懂。于是乎百度一下。
看到了这篇文章,才懂了一丢丢,不过感觉够用了。文章链接:http://www.cnblogs.com/kobe8/p/3859708.html
Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's root element)
我的代码:
//判断退出时的定义
private static Boolean isQuit = false;
private Timer timer = new Timer();
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup Container,
Bundle savedInstanceState) {
v = inflater.inflate(R.layout.setting,null);
init(v);
return v;
这不能忍,于是乎我就点进inflater方法,有道着查看了这个方法,发现有一个是两个参数的,一个是三个参数的。
inflate(
int
resource, ViewGroup root)
inflate(
int
resource, ViewGroup root,
boolean
attachToRoot)
于是乎我便修改成为下边的参数,结果一试就好了。但是具体的身为菜鸟的我真的不太懂。于是乎百度一下。
看到了这篇文章,才懂了一丢丢,不过感觉够用了。文章链接:http://www.cnblogs.com/kobe8/p/3859708.html
- Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's r
- Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's ro
- Avoid passing null as the view root convertView = infalInflater.inflate(R.layout.list_item, null);
- Avoid passing null as the view root
- Avoid passing null as the view root ?
- Avoid passing null as the view root windowManager使用
- LayoutInflater的错误用法(Avoid passing null as the view root )
- 关于LayoutInflater的错误用法(警告提示:Avoid passing null as the view root)
- When the layout is set to FIXED LAYOUT, the VERTICAL ALIGNMENT is not working. As soon as changed to
- Update layout parameters of view
- The layout (application/layout/scripts/layout.phtml)
- HTML:Set the table layout to fixed.
- How to use isInEditMode() to see layout with custom View in the editor
- As the manager, how to resolve the contention.
- Auto Layout still required after sending -viewDidLayoutSubviews to the view controller. 终极解决方法
- the css view helper (application / layout / helpers / css.php)
- Collection View Programming Guide for iOS-Using the Flow Layout
- view slide as the user slides finger on the screen?
- MySQL数据库的乱码问题
- innodb事务日志详解
- Redis从基础命令到实战之集合类型(Set)
- 事务产生的脏读幻读不可重复读
- ubuntu 16.04下安装chrome
- Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's r
- 使用CSS选择器定位页面元素
- UIBezierPath
- erlang性能分析及进程监控工具
- 关于mongodb3.x用户权限问题
- LeetCode 242. Valid Anagram
- springmvc(基础三) Springmvc 数据绑定
- 5.【函数】
- memcache