Changes

Jump to: navigation, search

An Overview and Example of Android Event Handling

39 bytes removed, 16:02, 3 July 2014
Designing the User Interface
<google>BUY_ANDROID</google>
Locate and select the activity_event_examplefragment_event_example.xml file created by Eclipse (located in the Package Explorer under EventExample -> res -> layout -> activity_event_examplefragment_event_example.xml) and double click on it to load it into the editing panel. Switch from the Graphical Layout tool to the XML file using the tab at the bottom of the editing panel and delete the current content of the file. With a blank canvas, either use the Graphical Layout tool to design the user interface from Figure 17-1 (making sure to change the IDs of the Button and TextView objects to myButton and myTextView respectively), or directly enter the following XML into the editor:
<pre>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/myLayout"

Navigation menu