Loading...

{{notif_text}}

SocialHelpouts is now CutShort! Read about it here
Who pays how much? Be informed with this salary report on Indian startups.
Why join channels?
Learn from peers
Discuss and share learning resources with the top professionals across the world
Open business or job opportunities
Earn reputation points to get consulting projects, attract talent or land jobs.
Accelerate your growth
Grow your network and get exclusive deals from our learning partners.
signup now
Priyank Agrawal asked a question

Is Relative Layout Better or Constraint Layout ?

Android team of Google in I/O 2016 released the Constraint Layout. Would like to know if migrating/recoding to constraint layout will help make our app faster in terms of UI rendering ?

answer
submitting answer...
submit
No answers yet. Be the first one to answer!
6 answers
Abhishek Jain Android and iOS developer

If you have the choice start with ConstraintLayout, but if you already have your app in RelativeLayout, stay with it. That's all I have been following. 

RelativeLayout is very limited in functionality and many complex layouts can't be made using it, especially when ratios are involved. I have been using a lot of LinearLayouts for getting the pixel perfect UI which can adapt to any screen size. My weapon of choice in this is using Layout Weights. This is seriously missing from RelativeLayout, thus accurate positioning and sizing of components are not possible with it. 

Now since ConstraintLayouts are here along with the support of Ratios, I can rework on the UI to remove few LinearLayouts to make it perform better. However, I have been holding the boat and not making it as my primary objective, since it requires too much work for all of my complex apps.

Loading comments...
Pritesh Patel code n code

Yes the performance will increase if you use constraint layout, but it has few problems. I tried migrating to constraint layout, but it is not working properly with textInputLayout and edit text combined so I didn't migrate.But you should give it a try.

Loading comments...
To view all answers to this question, join this channel
join this channel
Awesome! You have connected your Facebook account. Like us on Facebook to stay updated.