Android: Using alignBaseline for an image following text

前端 未结 7 2510
独厮守ぢ
独厮守ぢ 2021-02-13 04:35

Below is a TextView followed by an ImageView contained in RelativeLayout. I\'m trying to get the bottom of the image to align with the baseline of the text. When I use alignBa

7条回答
  •  一整个雨季
    2021-02-13 05:20

    Since API11 you can simply use android:baselineAlignBottom="true"

    Prior to API11 you can overwrite getBaseLine() and return image height.

提交回复
热议问题