How to declare global variables in Android?

前端 未结 17 2953
死守一世寂寞
死守一世寂寞 2020-11-21 04:12

I am creating an application which requires login. I created the main and the login activity.

In the main activity onCreate method I added the following

17条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-21 04:50

    On activity result is called before on resume. So move you login check to on resume and your second login can be blocked once the secomd activity has returned a positive result. On resume is called every time so there is not worries of it not being called the first time.

提交回复
热议问题