How to declare global variables in Android?

前端 未结 17 2998
死守一世寂寞
死守一世寂寞 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 05:02

    Just a note ..

    add:

    android:name=".Globals"
    

    or whatever you named your subclass to the existing tag. I kept trying to add another tag to the manifest and would get an exception.

提交回复
热议问题