TextView - detect if String exceeds available space

后端 未结 2 392
旧时难觅i
旧时难觅i 2021-01-26 16:09

Here is my layout

         RelativeLayout
             ImageView  iv1
             TextView  
                   toTheRightOf iv1
                   toTheEndOf           


        
2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-26 16:54

    Try this solution:

    
    
        
    
        
    
        
    
    

    In this layout, textview would ellipsize itself whenever the length would be greater than the available space.

提交回复
热议问题