Android Learner Android Learner - 1 year ago 49
Android Question

Linearlayout with weightSum and three layouts

Below is the item of layout i am using in listview.The issue is that when i make visibility of countlayout gone in some items of list I expect vibelayout to be exactly at same place where countlayout was since weigtSum is 3.But it is appearing slightly right of position where countlayout was.

I am using View.GONE so that countlayout space is assigned to vibelayout but its not happening.. vibelayout is appearing slightly right of position where countlayout was.

RRR RRR
Answer Source

Try using android:layout_width="0dp" in all 3 layouts. It will solve your problem