How to remove the top and bottom space on textview of Android

前端 未结 14 1951
执笔经年
执笔经年 2020-11-28 04:58

When I include the below XML to layout file, I can see the below image. If you see it, you could realize that the TextView has top and bot

14条回答
  •  萌比男神i
    2020-11-28 05:29

    Have you defined a layout margin? For example:

    android:layout_marginTop="5dp"
    

    Otherwise, if your text view is wrapped inside a LinearLayout or other container, then that cold have either padding or a margin too.

提交回复
热议问题