O'Reilly logo

Android UI Design by Jessica Thornsby

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

Adding and customizing view objects

The easiest way to add view objects to your layout is via the layout resource file in your project's res/layout folder, although you can also add views programmatically as and when required.

Over the next few sections, I'll show you how to create some of Android's most commonly used views, specifically TextViews, EditText, ImageViews, Buttons, and ImageButtons. Once you've created each view, I'll show you how to configure that view so it looks and functions exactly as you want it to.

TextView

It may not be the most exciting part of your user interface, but the vast majority of Android apps feature some kind of text. You display text to your users via TextView.

To create TextView, add the <TextView> tag to your project's ...

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