I have created two classes: Example1
and Example2
, which extends activity.
Example1
contains a UI of buttons, while Example2 contains UI of TextEdit. I want to call Example2 when a button is clicked, so this code is in an onclick
method
Intent i = new Intent();
i.setClassName("com.a.ui", "com.a.ui.Example2");
startActivity(i);
So I am able to get the UI of Example2 successfully. What's an alternate way of calling intent?
Is there any alternate way to start an activity?