zoukankan      html  css  js  c++  java
  • Bootstrap Button 使用方法

    Getting Started

    <!-- basic button -->
    <com.beardedhen.androidbootstrap.BootstrapButton
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="10dp"
        android:text="Success"
        bootstrapbutton:bb_icon_right="fa-android"
        bootstrapbutton:bb_type="success"
    />
    

    The above code inserts a default button with a android icon to the right. The following attributes can be added to any BootstrapButton

    bootstrapbutton:bb_type="default" The type of button as per the Bootstrap CSS Buttons

    bootstrapbutton:bb_icon_left="fa-heart" the icon to the left of the text, as per the Font Awesome Cheat Sheet

    bootstrapbutton:bb_icon_right="fa-trophy" the icon to the right of the text, as per the Font Awesome Cheat Sheet

    bootstrapbutton:bb_roundedCorners="true" whether the button should have rounded corners, the defaults is false

    android:enabled="false" disabled buttons appear more opaque, the default is true (buttons are enabled)

    bootstrapbutton:bb_size="large" Size of the button e.g. large, default, small, xsmall

    android:textSize="12sp" Text size must always be in sp!

    The button height (padding between text and button top/bottom) is not editable appart by using bb_size which also impact the text size. See this question for a workaround.

    You can also edit the button programmatically!

    button.setText("title"); changes the text displayed

    button.setLeftIcon("fa-star"); changes the left icon

    button.setRightIcon("fa-heart"); changes the right icon

    button.setBootstrapType("success"); changes the type of bootstrap button

    button.setBootstrapButtonEnabled("false"); change whether the button is enabled or disabled!

  • 相关阅读:
    NOI2021游记-记最后一段日子
    7.20 ZROI-Day7模拟赛
    7.19 ZROI-Day6模拟赛
    7.18 ZROI-Day5模拟赛
    7.17 ZROI-Day4模拟赛
    7.16 ZROI-DAY3 模拟赛
    7.15 ZROI-DAY2 模拟赛
    7.13 ZROI-DAY1赛后总结
    7.9模拟赛赛后总结
    7.7模拟赛赛后总结
  • 原文地址:https://www.cnblogs.com/boundary/p/3880756.html
Copyright © 2011-2022 走看看