isFinishing ()

来源:互联网 发布:美颜软件大全 编辑:程序博客网 时间:2024/05/20 14:41

 
        
AndroidisFinishing

平常忽略了的方法,其实挺有用的:  判断当前activity是否被干掉了!


[java] view plaincopyprint?在CODE上查看代码片派生到我的代码片
  1. public boolean isFinishing ()   
  2. Added in API level 1  
  3. Check to see whether this activity is in the process of finishing,  
  4. either because you called finish() on it or someone else has requested that it finished.   
  5. This is often used in onPause() to determine whether the activity is simply pausing or completely finishing.  
  6.   
  7. Returns  
  8. If the activity is finishing, returns trueelse returns false.  
  9. See Also  
  10. finish()   

上面这一段就是isFinishing方法的api文档解释! 

0 0
原创粉丝点击