Button input

The button input is one of the most common type of components used in an Android project. Let's come back to our design mode and create a button on the screen:

Reverting back to Design mode from Text mode

Click on the Design button and switch back to our visual editor mode on our activity_fullscreen.xml file.

Here, we will need to do some changes to our XML file. Follow the steps as mentioned:

  1. From the Palette, scroll down and find Linear Layout(Horizontal) and drag and drop it inside the fullscreen_content_controls.
  2. In the Component Tree window below the Palette, drag and drop your TextView under your newly created LinearLayout(horizontal) ...

Get Learning Android Game Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.