Align ImageView with EditText horizontally

前端 未结 7 1041
天涯浪人
天涯浪人 2021-01-01 04:21

I\'m trying hard to find a way of aligning an EditText and an ImageView properly on Android. I keep getting this result:

<

7条回答
  •  忘掉有多难
    2021-01-01 05:12

    Have you tried the setCompoundDrawables() methods for the EditText.

    You can try setting the intrinsic bounds using the setBounds() method on the Drawable or by using the setCompoundDrawablesWithInstrinsicBounds() method.

    This should work on all devices.

提交回复
热议问题