搜尋此網誌

2015年1月13日 星期二

【Android】onActivityResult()和onResume()誰先執行

ref:onActivityResult()和onResume()的調用順序問題

protected void onActivityResult (int  requestCode, int resultCode, Intent  data)
Since: API Level 1 Called when an  activity you launched exits, giving  you the requestCode you started it  with, the resultCode it returned, and  any additional data from it. The resultCode will be RESULT_CANCELED if  the activity explicitly returned that,  didn't return any result, or crashed  during its operation. You will receive this call immediately before onResume() when your activity is  re-starting.

由此可見onActivityResult()發生在onResume()之前

沒有留言: