如题:我在主线程(UI线程)中可以使用LayoutInflater的inflate(int resource, ViewGroup root)方法,来实例化resource对应的xml文件生成View对象。为了提供用户体验我想把inflate(...)的调用,放到另一个线程去生成View,发现报android.view.InflateException: Binary XML file line #88
在xml文件中第88行中的控件不能生成了是不是inflate(int resource, ViewGroup root)这个方法对线程有什么特殊的要求?
在xml文件中第88行中的控件不能生成了是不是inflate(int resource, ViewGroup root)这个方法对线程有什么特殊的要求?
解决方案 »
- 问个基础问题!
- AlarmManager只有第一次准时第二次以及之后变得不准时
- android工程导入没有错误,运行提示Unable to instantiate activity ComponentInfo
- 【70分!急!】代码并未往下执行!
- android客户端与服务器servlet通信的一个问题,求解惑。。。
- 如何实现点状的载入进度条?
- 如何让Android Button的leftDrawable图实现旋转动画效果?
- Android环境搭建问题
- 小妹 java ee出身,想学习android,大牛们给个建议把
- 在 getview 中 有查询数据库 操作 会产生 什么 后果?
- android在通知栏中加入progressbar
- 怎样一种心情来求助、、高手高手
layoutInflater lay=layoutInflater.from(this)//this是主Activity的引用View myView=lay.inflate(int resource, ViewGroup root)这样的...
use getLayoutInflater() or getSystemService(String) to retrieve a standard LayoutInflater instance that is already hooked up to the current context