Android Build a Simple Android App with Java Creating the Screen Layout Editing a Layout File

Jovy Ong
Jovy Ong
Front End Web Development Techdegree Student 14,858 Points

Why opt to use RelativeLayout instead of ConstraintLayout here?

I have experience in working both with RelativeLayout and ConstraintLayout. ConstraintLayout is far easier to work with, more powerful, and is newer than RelativeLayout so why do we still use RelativeLayout here?

3 Answers

Ben Deitch
STAFF
Ben Deitch
Treehouse Teacher

Hey Jovy! Mostly it's just because RelativeLayout is more beginner friendly. Since this is the very first Android course we wanted to spend most of it teaching the fundamentals of how to create/run an Android app without getting too much into anything else. Either layout will work, though we save learning about ConstraintLayouts for the next course :)

Have you tried using it when having buttons and textViews side by side on an activity layout

Jovy Ong
Jovy Ong
Front End Web Development Techdegree Student 14,858 Points

Yes. As far as I can visualize, that can done with ConstraintLayouts with the same amount (or less) of work. I mean, it's pretty similar.