In my opinion, itβs nice to transfer ACTIVITY somewhere - in fact, I'm not sure if this will be done at all.
What can you do:
1 - You can create your own class by expanding the View class, creating your own interface. What you need to pass to this class is your activity context!
eg:
class Custom_UI_Builder extends View { public Custom_UI_Builder(Context cxt) { super(cxt);
in Activity that uses your UI class
public myActivity extends Activity{ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myView = new Custom_UI_Builder(this);
2 - Then you can create an instance of the custom_UI_builder class in your activity.
I'm not sure if this will have undesirable effects when loading memory.
Hope it works!
karla source share