How do I vertically align an item within a list using relative layout?

后端 未结 3 2167
说谎
说谎 2020-12-19 08:37

I am using a list view in Android 1.5 to show a list of images and text next to the image. I am trying to vertically center the text but the text is at the top of the row i

3条回答
  •  时光说笑
    2020-12-19 08:41

    Baseline directive would do it, but ImageView simply does not support baseline alignment as of today. You can work around this by creating a subclass of ImageView, override the getBaseline() method and return the height of the image.

提交回复
热议问题