如题:我在主线程(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)这个方法对线程有什么特殊的要求?
解决方案 »
- service能否调起一个activity
- ListView 中item背景问题
- IP地址输入框的输入法怎么控制,希望显示数字键盘
- 各位大牛,Camera模块预览界面size的问题
- Android 1.6下not enough memory for layer bitmap错误是怎么回事?
- Ophone上如何建立自定义分辨率的模拟器
- 关于安卓界面Graphical layout设置的问题!!!!!!!!
- android sqlite3大数据量存储
- 请问把控件作为jar包时,怎么出这个错
- RecyclerView Adapter 使用不同Context创建LayoutInflate有什么区别?
- 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