Time for action - adding more buttons

We have two additional buttons to add to the screen layout. One will allow the user to skip the current question; the other will allow them to look at the short list of meals that we have filtered through so far (based on the questions they have already answered).

  1. Start by creating an empty<Button /> element below our answers ViewGroup <LinearLayout /> (but still within the root LinearLayout element). Assign it the ID skip, so that we can reference it in Java:
    android:id="@+id/skip"
    
  2. Create some padding between the answers and the new button by using a margin:
    android:layout_marginTop="12sp"
    
  3. Give it the display label Skip Question:
    android:text="Skip Question"
    
  4. Like all of the previous widgets, the width should ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.