Can´t center textview´s text vertically

前端 未结 7 1579
闹比i
闹比i 2021-02-09 16:20

[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

    I think you can try one of these ways:

    1. in TextView ,set android:layout_centerVertical="true"

    or

    1. as the 1st answer, but I think it should be android:layout_height="match_parent"

    why your code in second app works, I guess , maybe the height of image equals the textView

提交回复
热议问题