How to place button inside of edit text

后端 未结 11 662
我在风中等你
我在风中等你 2020-12-04 10:17

I want to place an image button inside of EditText, but I don\'t have Idea please tell me how to do so as shown in the figure . Thanks

11条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-04 11:00

    My solution will fit all screen sizes without the editText going "behind" the imageButton. This also uses android resources, so you do not need to provide your own icon or string resource. Copy and paste this snippet wherever you would like a search bar:

       
      
       
    
        
    
    
    

    Restult:

    enter image description here

提交回复
热议问题