Prepare activity for RelativeLayout - Main image

Intermediate

Prepare activity for RelativeLayout

In some of our examples we use RelativeLayout to setup activities or layouts. We do this to make it simpler to start a project and show a sample. If our sample is using RelativeLayout you can use this steps to set it up.

Miha Cirman
1 min read

In some of our examples we use RelativeLayout to setup activities or layouts. We do this to make it simpler to start a project and show a sample. If our sample is using RelativeLayout you can use this steps to set it up.

Programming is a skill best acquired by practice and example rather than from books. Have a look at our Android Development course and get the skills you need.

Start Now

We will prepare our activity for use with RelativeLayout

1. Open Layout Editor for MainActivity. You can read more about Layout Editor on our blog.

Layout Editor

 

 

2. Just to make it simple for us to add buttons on screen, we will change the ConstraintLayout to RelativeLayout

  • Switch to text modeText Mode
  • Select tag for constraint layout and rename it
    Change Constraint Layout
    Choose Relative Layout
  • Switch to design mode again

 

 

Loading FB comments...