SurfaceView中弹出Dialog的实现
来源:互联网 发布:java md5加密 32位 编辑:程序博客网 时间:2024/05/22 16:47
需要在SurfaceView中弹出对话框,无法直接实现,避免是SurfaceView线程中修改UI。
折中的解决办法:在创建SurfaceView时会得到Context,使用其中的holder就可以弹出Dialog了。
备忘:
//自定义绘图方法
public void myDraw(){
//game over
if(player.live<=0){
flag=false;
context.hanlder.post(new Runnable(){
public void run() {
context.showDialog();
}
});
return;
}
- SurfaceView中弹出Dialog的实现
- Dialog中弹出PopupWindow
- Application中弹出Dialog
- BroadcastReceiver中弹出Dialog
- Dialog中弹出PopupWindow
- Menu中弹出Dialog示例
- Service中弹出Dialog Toast
- iphone中弹出动画的实现
- Android中弹出对话框的实现
- 如何在service中弹出dialog
- 如何在service中弹出dialog
- android在Service中弹出Dialog对话框
- 如何在service中弹出dialog
- 如何在service中弹出dialog
- 在Service中弹出Toast和Dialog
- 如何在service中弹出dialog
- 如何在service中弹出dialog
- 如何在service中弹出dialog
- 11 种 CSS 代码优化和格式化的工具[转]
- 配置Erlang shell的工作路径
- 导数、极限的本质
- vc中单文档程序切换不同视图
- postgis 常用函数
- SurfaceView中弹出Dialog的实现
- Handling IRPs: Introduction
- Shell统计代码行数
- attrs.xml文件中属性类型format值的格式 .
- ARM920T的MMU与Cache
- linux SysV IPC实现
- jQuery学习02---jQuery对象与Dom对象
- 傅盛2
- 深入理解java多态性