Remove space between stacked TextViews

后端 未结 8 1729
南旧
南旧 2020-12-09 02:27

I have a vertical LinearLayout with two TextView inside it. The former contains a static text property (it\'s text never change) and the last conta

相关标签:
8条回答
  • 2020-12-09 03:29

    Try using negative margins. It may take a bit of playing with the numbers to get it right, but I've done it before and it worked out well.

    android:layout_marginTop="-5dp"
    
    0 讨论(0)
  • 2020-12-09 03:31

    Negative Margins would do the work. You can set it by two methods -

    1) by xml - set the android:Layout_marginTop="-10dp" field negative

    2) by java (Programmatically) - set the topMargin field of LayoutParams to negative.

    0 讨论(0)
提交回复
热议问题