Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use Constraint Layout & How to use it efficiently? [closed]

Google recently comes with another layout called ConstraintLayout However, I have few questions which is still very confusing.

I reviewed the talk related with this portion from google IO'16 and got an understanding that it would be really helpful as developer to create flat UI and performance would be better than any other layouts.

Questions:

1. In which case, We should use constraint layout?

2. Does introduction of ContraintLayout means that we should not use LinearLayout,RelativeLayout..etc anymore?

3. What is the efficient way to use ContraintLayout?

like image 657
Bhavesh Patadiya Avatar asked May 20 '16 14:05

Bhavesh Patadiya


1 Answers

You probably shouldn't have been so eager to jump on your question here since IO is still going on

I suggest you go watch the session called Android Layouts: a new world (currently not available at time of writing) where they go into detail about ConstraintLayout

ConstraintLayout appears to be an easier way to create layouts without dealing with xml. Constraints layout is based off of RelativeLayout and is not meant to kill off other layouts since they are still very useful.

This being said as @CommonsWare said this is very very new and has no official documentation so its very difficult to come to a real conclusion about it. I would say it is like other layouts where it is usage is going to be based on what you want your design to look like

like image 159
tyczj Avatar answered Oct 04 '22 01:10

tyczj