Search code examples
javaandroidandroid-custom-viewandroid-bootstrap-widgets

AndroidBootstrap button height


How to make AndroidBootsrap buttons height smaller?

The padding between the button top/bottom and the text is too important compared to standard buttons. Using the bootstrapbutton:bb_size="small" button property also reduces the text and still keeps an important top/bottom padding.


Solution

  • (Self-answered question, as it may help other users)

    Edit AndroidBootstrap project > src > com.beardedhen.androidbootstrap > BootstrapButton.java:

    Replace

        layout.setPadding(0, paddingB, 0, paddingB);
    

    By

        layout.setPadding(0, (int)(paddingB*0.7), 0, (int)(paddingB*0.7));