Welcome to the AND class. This will be your first codelab, that should get your started on your journey to becoming a professional Android developer. Each class will have exercises in this format. Notice that you can keep track of the remaining time for the exercises, and that the browser will store any progress you make along the way. The layout is responsive, so you can also access the exercises on a mobile device, if you find that more convenient.

Today you will learn to create your very first hello world application, focusing on the user interface (UI). The UI that appears on a screen of an Android device consists of a hierarchy of objects called views — every element of the screen is a View. The View class represents the basic building block for all UI components. Even layouts such as LinearLayout and ConstraintLayout are subclasses of the View class.

What you'll learn

Create a new project for phone and tablets

Run your new project on an emulator and on a phone or tablet.

Implement a vertical LinearLayout containing a TextView, an ImageView and a Button.

Create a responsive layout with two ImageViews of different color. One image should take up 25% of the screen, the other 75% - no matter the screen size or orientation.

Implement the layout shown in the image below consisting of a LinearLayout and TextViews. Focus on using margin and padding properly. It does not have to be pixel perfect.

Implement a ConstraintLayout using the Design View. Drag various widgets from the palette and onto the layout. Constrain the views together, to their parents and to guidelines you add. Try to chain the views together.

Implement the layout shown in the image below using ConstraintLayout. The image and text does not need to mach.

Copy the layout of a simple app on the Google Playstore.

Follow these three steps:

  1. Identify Views in the picture
  2. Consider how to position the Views using ViewGroups and various attributes
  3. Style your Views to get the desired look.

Use everything you have learned so far to design and develop your own digital Business Card!