Skip to content

Exercise 02 - Build UI with Layout Editor 1

Project name : E02 Build UI With Layout Editor 1

Introduction

The purpose of this exercise is to learn to use Layout Editor. You will add a few view objects to your UI and you need to position those to the different places in the screen. You need to check that your UI is working correctly in different devices and screen sizes.

In the below, you can see, that image is always centered horizontally and vertically. There will be one label above it and four labels in different corners. Select image with your mouse right button and click "Open image in New Tab" to see details better.

!Image 01 !Image 02

How to work

  • Create a new project and name it to E02 Build UI With Layout Editor 1
  • Remember save your project in your android-exercises folder
  • Add four TextView components to your UI and position those to different corners
  • Remember add TextView thext to string resources
  • Add one image to your project drawable folder. You need to drag and drop one image to your res/drawable folder and use that image in your ImageView.
  • Add one ImageView component to your UI and use above image in it
  • Add one TextView above ImageView
  • Test your layout in portrait and landscape

There is an example layout image below.

!Image 02

Test and push

Test your application in emulator, take screenshots and commit/push your project and screenshots back to JAMKIT/GitLab. Remember move your exercise/issue ticket from Doing to In Review in Issues Board and write your learning comments to issue comments.