没有啊,按返回键之后,进度条会消失,但是onKeyDown方法里面标志打印不出来。
我的想法是在开启网络线程的时候出现进度条,如果按返回键,进度条消失,新网络线程结束。
我的想法是在开启网络线程的时候出现进度条,如果按返回键,进度条消失,新网络线程结束。
解决方案 »
- 为什么总是显示不出照相机,并且屏幕一直是黑的!
- 简易音乐播放器,遇到一个问题。。。新手求指导
- MediaPlayer播放视频调用prepare()出错,怎么办呀!!!!!!
- 所有积分送出,解决UI错位的问题
- 看到很多问URL()中地址带汉字(中文)的处理方法,贴下简单的.
- 搜狗浏览器收藏夹为什么不能在线更新
- 如何android中利用opencore开发cmmb播放器?
- TableLayout如何保证宽高比?
- 问个支付宝手机网页支付的问题。
- 为什么4.4.4下的系统调用startActivityForResult()同时onActivityResult()被执行了
- android 如何实现自动接通来电??
- 请教一个动态加载自定义View的问题!!!!!!
见过一个
那个点击 back 后 进度条 逐渐减少到0 然后退出
progressDialog.setOnCancelListener();
貌似在的按返回键的时候,会执行这个方法里面的操作。能给我一个能捕获到的例子吗?
Since: API Level 1 Default implementation of KeyEvent.Callback.onKeyMultiple(): perform press of the view when KEYCODE_DPAD_CENTER or KEYCODE_ENTER is released, if the view is enabled and clickable.Parameters
keyCode A key code that represents the button pressed, from KeyEvent.
event The KeyEvent object that defines the button action. Returns
If you handled the event, return true. If you want to allow the event to be handled by the next receiver, return false.
楼主可以在progressDialog处理返回键消息的时候返回false。
关键是为什么进度条show以后,public boolean onKeyDown (int keyCode, KeyEvent event) 方法就不会响应啦?
其他的view就接收不到焦点了。