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!

  • 相关阅读:
    操作系统六文件管理
    Educational Codeforces Round 38 (Rated for Div. 2) ABCD
    51nod 1100 斜率最大
    51nod 最小方差
    51nod 1065 最小正子段和
    P1280 尼克的任务
    牛客小白月赛2
    Codeforces Round #210 (Div. 1) B 二分+dp
    江西财经大学第一届程序设计竞赛
    51nod 1596 搬货物
  • 原文地址:https://www.cnblogs.com/boundary/p/3880756.html
Copyright © 2011-2022 走看看