弹出类提示框传入参数问题
来源:互联网 发布:mac上怎么解压缩 编辑:程序博客网 时间:2024/05/16 23:02
做项目的时候 出现android.view.WindowManager $ BadTokenException异常,找错误原因,看到这么一段话:
You need to use your Activty as the Context for the Dialog not the Application.Android is looking for a view to display the Dialog in and the Application does not have one but yourActivity will.The Application is an object which ties your app together and has a Context as it knows about which locale you're running in and so on, but it relies on Activities to display things to the user. 哦,原来这种弹出类的控件传入参数的时候不能传入context值,必须传入activity.this类型的值,将传入的值改为activity.this,搞定!
0 0
- 弹出类提示框传入参数问题
- WinMain参数传入问题
- Mybatis多参数传入问题
- MyBatis传入参数的问题
- MyBatis传入参数的问题
- MyBatis传入参数的问题
- MyBatis传入参数的问题
- MyBatis传入参数的问题
- vc 调用win32程序 参数传入问题
- C中函数传入参数不确定问题
- linux中线程传入参数问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- MyBatis传入多个参数的问题
- 第十四周阅读程序
- 四种I/O模型
- 搭建高可用mongodb集群
- cocos2dx uiButton 的几种常用方式
- hbase 自定义 endpoint coprocessor
- 弹出类提示框传入参数问题
- event 对象兼容火狐、谷歌、ie浏览器问题
- 润乾——报表参数
- 48小时脑力激荡 中美青年创客大赛英特尔北京选拔赛
- NOJ [1186] Get the Width
- Cocos2d-x 缓存机制:预加载与重复使用
- 钢条切割4(15章:动态规划)。。。2014.5.26
- android传感器
- windows程序设计遇到问题,没能力解决了希望热心人指教