Android EditText draw a divider line between its drawable and its text

后端 未结 4 1029
逝去的感伤
逝去的感伤 2020-12-31 10:05

I have an EditText with a drawableLeft image. I need to add a vertical line in EditText right beside my drawableLeft like

4条回答
  •  悲&欢浪女
    2020-12-31 11:04

    1. Create a rectangular rounded corner shape in res/drawable/shape.xml

      
      
      
      
      
      
      
    2. Now create a layout

      
      
      
      
      
      
      
      
      
      
      
      
      
    3. I have set the Linear layout background with th rectangular rounded corner shape. It looks exactly as the image preview of urs.

提交回复
热议问题