}; |
|
@Override |
public boolean onKeyDown( int keyCode, KeyEvent event) { |
System.out.println( "TabHost_Index.java onKeyDown" ); |
if (keyCode == KeyEvent.KEYCODE_BACK) { |
if (isExit == false ) { |
isExit = true ; |
Toast.makeText( this , "再按一次后退键退出应用程序" , Toast.LENGTH_SHORT).show(); |
if (!hasTask) { |
tExit.schedule(task, 2000 ); |
&nb![](https://img-blog.csdnimg.cn/img_convert/f63b4eb2141d0b3542e79cd58b15efaa.png) sp; } |
} else { |
finish(); |
System.exit( 0 ); |
} |
} |
return false ; |
;