This week I embarked on learning how to design a user interface for an Android App. I was expecting to be doing a lot of coding and having to design my own buttons but Android Studio makes it surprisingly easy. It has a layout editor that lets you view the design of the app as you make it.
The next step was to add a test box and a button. These are pretty useful in most apps so learning this first makes sense.
You can see several arrows pointing to the top and side of the “screen.” This is so that the text and buttons have a defined distance to stay away from the edge of the screen. This is important because if you don’t specify this the button or text box could be rendered off the edge of the screen.
To change the text in the box and the button you don’t just double click and edit text. You have to go in and change the strings.
This allows you to have a single text item that can be used for multiple buttons, text boxes etc. So a little more work upfront but a huge time saver in the end.
Voila we now have an app with a text box and a button!
Next Week: Adding another activity (making things work with other things)