6

I have a row in a list that I am trying to implement. I can use one RelativeLayout or one LinearLayout with weights. Is there a clear winner in performance for one RelativeLayout or one linearLayout with weights?

roiberg
  • 13,629
  • 12
  • 60
  • 91
  • Linearlayout with weights. – keshav Dec 09 '13 at 13:18
  • Is there a clear limit? How can one tell? – roiberg Dec 09 '13 at 13:22
  • If you does not have a lots of views, then difference in performance between LinearLayout and RelativeLayout is negligible. There is no clear limits. In my opinion, you just need to choose the most convenient for your job. – yyunikov Dec 09 '13 at 13:46

1 Answers1

2

It actually depends on what you are trying to implement. If this is just a content of a row from ListView, I would prefer LinearLayout with weights. There are good answers from this question about using RelativeLayout or LinearLayout, which is related to your's:

Is a RelativeLayout more expensive than a LinearLayout?

Community
  • 1
  • 1
yyunikov
  • 5,719
  • 2
  • 43
  • 78