Android Lesson 2 - Constraint Layout


A simple ui tutorial in android by constraint layout.

Constraint Layout has no view hierarchies that is why i am choosing it as my first layout tutorial.
Please watch the demo in the below video to better understand what i am talking about.



Views in constraint layout needs to be connected to minimum one horizontal and one vertical connection. otherwise when you run the app in AVD or on mobile, you will find the element position to be at 0,0

how to connect constraints:

To connect constraints click and drag the circles to screen corners as shown in video. You can constraint views (buttons, texts are views elements - we will cover them later) to each other based on where you want to place it.

connect to top 
connect to sides

and to right side also to center.

there are a lot more features in constraint layout. we will cover them as we progress. Practice along with me.

Post a comment

0 Comments