In my project,i need to use some UI object (such as Textview) that Between two Independent class or two activity;
In this case,to avoid repeating the code which get UI object,I want use an static Ui object to instead. Of course ,i am also thinking about the safty of static object in App life cycle; But The article of android-static-object-lifecycle clear up my doubt;
the value of the static variable will persist when you switch to a different activity of another application and none of the below three happens.
1. the class is unloaded
2. the JVM shuts down
3. the process dies
In my Opinion ,using static object no only safty but also more convinece to use in different class; But In fact it is rarely see in others project. Is there any Disadvantage to use static ui object?
Please post your suggestions on this... Thanks in advance