Can´t center textview´s text vertically

前端 未结 7 1771

[Solved] I had to add android:fillViewport=\"true\" to the ScrollView, that fixed the problem with the text not centering vertically.

I know this has been

7条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-09 16:58

    One solution that DOES work (all the above don't) if you are only concerned about your text itself, is to make the textView just as high as the imageView (by aligning it to top without margin, and bottom to id of "other views") and then use android:gravity="center" in this text box (make sure no other alignments interfere with this gravity)

提交回复
热议问题