O'Reilly logo

Android User Interface Development by Jason Morris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - implementing the reservation layout

In our main.xml layout resource, we need to add the View objects which will form the Reservation tab. Currently it consists only of an empty ScrollView, which enables vertically-long layouts to be scrolled by the user if the entire user interface doesn't fit on the screen.

  1. Open the main.xml file in your editor or IDE.
  2. Inside the<ScrollView> we had created for the Reservation tab earlier. Declare a new vertical LinearLayout element:
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
    
  3. Inside the new LinearLayout element, create a TextView to ask the user under what name the reservation should be made:
    <TextView android:text="Under ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required