Loading...

{{notif_text}}

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
{{::getFormatedLocalTime("2017-01-10T20:35:18.105Z", {without_time: true})}}

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!
7 answers
Abhishek Jain Android and iOS developer
{{::getFormatedLocalTime("2017-03-08T10:12:13.015Z", {without_time: true})}}

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
{{::getFormatedLocalTime("2017-02-16T14:29:45.187Z", {without_time: true})}}

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
Learn how Cutshort Channels work
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.
Okay
Privacy policy
File upload not supportedAudio recording not supported
This browser does not support file upload. Please follow the instructions to upload your resume.This browser does not support audio recording. Please follow the instructions to record audio.
  1. Click on the 3 dots
  2. Click on "Copy link"
  3. Open Google Chrome (or any other browser) and enter the copied link in the URL bar
Done