Changes

Jump to: navigation, search

Android Touch and Multi-touch Event Handling

No change in size, 16:07, 3 July 2014
Designing the Activity User Interface
== Designing the Activity User Interface ==
The user interface for the application’s sole activity is to consist of a RelativeLayout view containing two TextView objects. Within the Package Explorer panel, navigate to MotionEvent -> res -> layout and double click on the activity_motion_eventfragment_motion_event.xml layout resource file to load it into the Graphical Layout tool. One option is to design the layout illustrated in Figure 18-1 using a RelativeLayout as the root view and keeping in mind that the lower TextView component is centered horizontally within the parent view and the upper TextView is positioned a relative distance above the lower TextView. Alternatively, switch to the XML editor by selecting the activity_motion_eventfragment_motion_event.xml tab at the bottom of the layout panel and replace the current XML with the following:
<pre>

Navigation menu