Android: Using alignBaseline for an image following text

前端 未结 7 2521
独厮守ぢ
独厮守ぢ 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:21

    You should use both following lines in your ImageView to align bottom of Image view to bottom of nearby TextView:

            android:layout_alignBaseline="@+id/txtview"
            android:baselineAlignBottom="true"
    
    
        
    
        
    
    

提交回复
热议问题