RelativeLayout vs LinearLayout with weights

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

+4
source share
1 answer

Actually, it depends on what you are trying to implement. If this is just the contents of a row from a ListView, I would prefer a LinearLayout with weights. There are good answers to this question about using RelativeLayout or LinearLayout, which is related to yours:

Is RelativeLayout more expensive than LinearLayout?

+1
source

All Articles