Can't Get Rid Of Bottom Padding On Button September 30, 2023 Post a Comment I have a button. It seems to have bottom padding I cannot get rid of: Solution 1: The padding is in the 9-patch of the buttons themselves.I'd advise against trying to compensate because these graphics resources can change without notice. You'd be better off building your own 9-patch or editing the existing one to remove the padding.Solution 2: setting android:layout_marginBottom="-5dp" for the button worked nicely for me.Solution 3: I am late to answer this but thought to share if someone come across similar use case( Removing all the inner and outer padding in Button )<Button android:id="@+id/textView1"android:layout_width="wrap_content"android:layout_height="wrap_content"android:layout_marginBottom="-5dp"android:layout_marginLeft="-5dp"android:layout_marginRight="-5dp"android:layout_marginTop="-5dp"android:minHeight="-2dp"android:minWidth="-2dp"android:text="TextView"android:textSize="12sp" /> CopySolution 4: Hmn really strange. Never noticed that. Probably because u usally want a little space around your buttons.Also tried margin/padding=0dp and did in fact not work. You could set android:layout_marginBottom="-10dp" however :). Share Post a Comment for "Can't Get Rid Of Bottom Padding On Button"
Post a Comment for "Can't Get Rid Of Bottom Padding On Button"