linear layout are not getting divided equally when the text width inside them are changing
I have a linear layout (horizontal) inside which there is 3 linear layouts, each of them have a textview inside them.
Now I wanted to divide these linear layouts equally. So I added weight to them as 1. It works perfect.
But now when the 开发者_运维知识库text width inside them are varying they are no more of equal weight :(
Say for any linear layout i removed the text, or wrote a smaller text or varying length text then it is loosing the equal distribution. What do I do to make the layouts uniformly distributed.
And one more thing i would like to know say the text width increases the max allocated width for these layout (these will be given dynamically may be by doing width = 1), then how do i move the text to next line.
Make sure you set the width to 0dip for each item inside the LinearLayout.
精彩评论