Home Getting confused using weightSum

# Getting confused using weightSum

firou1925-firas Omrane
1#
firou1925-firas Omrane Published in 2017-11-14 23:43:22Z
 First of all this is a layout of a fragment that contains a TextView ,View and a ListView.The View which is a gray line do not appear. I want to get in the top the TextView and below it the gray line then the ListView. I knew that the layout_weight < weigthSum but when using it like that I get the ListView too much in the bottom so I tried it = 165 and got a better result but still not getting the gray line This is the xml for the layout where I have set the weightSum=100 and the layout_weight of the relative layout that contains the textView and the ImageView =165 .  
premkamal008
2#
   This should serve your purpose. One needs to be a bit careful using the height definition, layout_weight, weight_sum values. (the parent-child layouts' relationships should be taken care of while defining the values). PS: Using of unnecessary layouts is a bad practice and makes the UI rendering slow, so try to use simpler layouts & less of nesting. :)
 You need to login account before you can post.
Processed in 0.326715 second(s) , Gzip On .