Changes

Jump to: navigation, search

Android Explicit Intents – A Worked Example

9 bytes added, 15:57, 4 July 2014
Designing the User Interface Layout for ActivityA
== Designing the User Interface Layout for ActivityA ==
The user interface for ActivityA will consist of a RelativeLayout view containing EditText, TextView and Button views named editText1, textView1 and button1 respectively. Using the Package Explorer, locate the activity_afragment_activity_a.xml resource file for ActivityA and double click on it to load it into the Graphical Layout tool. Either design the layout in the Graphical Layout tool, or switch to the XML view and enter the following XML. Note that the “Ask a Question” text displayed on the button view has been assigned to a string resource named ask_text.
If designing the user interface using the graphical tool, be sure to edit the XML afterwards to add the onClick handler for the button1 view:

Navigation menu