开发者

How to manage objects?

开发者 https://www.devze.com 2023-01-15 00:57 出处:网络
I am new to Android development. I want to know how you all manage objects. For eg we make object as A a = new A(); and then manage that object.

I am new to Android development. I want to know how you all manage objects. For eg we make object as A a = new A(); and then manage that object. But, here, we call A.class;

My concern is that i dont want to call onCreate(),nor do i want to push UI screen. I just want to make 1 static object for 1 screen;and want to manage it throughout my application that is, instead of calling A.class; can i call A a = new A(),and manage that object without pushing,开发者_Python百科and whenever i need i push that screen. Is there someway ?

Thanks...


I just want to make 1 static object for 1 screen;and want to manage it throughout my application that is
That somehow describe what an Activity is for. Your complete question suggest that you have no idea how Android works and why it is meant to be. You should start at least with the fundamentals and than work through tutorials to get a feeling. Fundamentals can be found here: http://developer.android.com/guide/topics/fundamentals.html

0

精彩评论

暂无评论...
验证码 换一张
取 消