平常忽略了的方法,其实挺有用的: 判断当前activity是否被干掉了!
- public boolean isFinishing ()
- Added in API level 1
- Check to see whether this activity is in the process of finishing,
- either because you called finish() on it or someone else has requested that it finished.
- This is often used in onPause() to determine whether the activity is simply pausing or completely finishing.
- Returns
- If the activity is finishing, returns true; else returns false.
- See Also
- finish()
public boolean isFinishing ()
Added in API level 1
Check to see whether this activity is in the process of finishing,
either because you called finish() on it or someone else has requested that it finished.
This is often used in onPause() to determine whether the activity is simply pausing or completely finishing.
Returns
If the activity is finishing, returns true; else returns false.
See Also
finish()
上面这一段就是isFinishing方法的api文档解释!