Textview with long text pushes out other views in GridLayout despite ellipsize=end

前端 未结 14 1858
星月不相逢
星月不相逢 2020-12-24 01:19

My problem is very similar to How to get a layout where one text can grow and ellipsize, but not gobble up the other elements on the layout, but read on below why I can\'t u

14条回答
  •  醉梦人生
    2020-12-24 02:12

    Try using Layout Weight

       
    
            
    
            
    
            
    
            
    
            
    
            
        
    

    Here i have taken table row in which there is layout weight sum which is of 10 means that it is 100% width of its parent. and in all its child views i have set width to 0Dp and given weight to 1 or 2. so that it will take up to that percent of total 10. so the layout will be adjusted accordingly screen and also there will be no issue of overlapping.

    If i have understood you correctly then this is the answer you wanted.

    Hope it Helps!

提交回复
热议问题