How to place button inside of edit text

后端 未结 11 673
我在风中等你
我在风中等你 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 10:39

    This is pretty simple I feel. Use relative layout as your parent layout. Place the editText to left and ImageButton to the right using either,

    • alignRight property for the ImageButton
    • by specifying the layout weight for each of the fields

提交回复
热议问题