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!

Bootstrap Button 使用方法的更多相关文章

  1. bootstrap插件学习-bootstrap.button.js

    先看bootstrap.button.js的结构 var Button = function ( element, options ){} //构造器 Button.prototype = {} // ...

  2. Bootstrap Table使用方法详解

    http://www.jb51.net/article/89573.htm bootstrap-table使用总结 bootstrap-table是在bootstrap-table的基础上写出来的,专 ...

  3. 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法--(转)

    如有雷同,不胜荣幸,若转载,请注明 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法 最近做一个Web网站,之前一直觉得bootstrap非常好,这次使用了boot ...

  4. 转载 JS组件Bootstrap Select2使用方法详解

    JS组件Bootstrap Select2使用方法详解 作者:懒得安分 字体:[增加 减小] 类型:转载 时间:2016-01-26我要评论 这篇文章主要为大家介绍了JS组件Bootstrap Sel ...

  5. 转载------让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法

    本文是转载及收藏 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法 最近做一个Web网站,之前一直觉得bootstrap非常好,这次使用了bootstrap3,在c ...

  6. Bootstrap button源码分析

    /* ======================================================================== * Bootstrap: button.js v ...

  7. bootstrap支持ie8 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法

    做一个在线系统,PC端也要做,但要兼容千恶的IE8[IE6 是万恶,打死我都不会管IE6],IE8 是我底线了md, 在IE8下 bottstrap 错乱,变形,不支持一些属性的问题,下面看了一篇 某 ...

  8. 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法

    首先需要确保你的HTML页面开始部分要有DOCTYPE声明.DOCTYPE告诉浏览器使用什么样的HTML或XHTML规范来解析HTML文档,具体会影响:对标记attributes .propertie ...

  9. 让IE6 IE7 IE8 IE9 IE10 IE11支持Bootstrap的解决方法 转载

    最近做一个Web网站,之前一直觉得bootstrap非常好,这次使用了bootstrap3,在chrome,firefox,safari,opera,360浏览器(极速模式).搜狗浏览器等浏览器下均没 ...

随机推荐

  1. [Node] Define MongoDB Model with Mongoose

    const mongoose = require('mongoose'); mongoose.Promise = global.Promise; // url friendly const slug ...

  2. 并查集(disjoint set)的实现及应用

    这里有一篇十分精彩.生动的 并查集详解 (转): "朋友的朋友就是朋友"⇒ 传递性,建立连通关系 disjoint set,并查集(一种集合),也叫不相交集,同时也是一种树型的数据 ...

  3. WordPress的后台功能菜单介绍与操作,WordPress后台说明

    WordPress网站的后台概况和登陆地址 网站都有个后台管理系统,通过网站后台,你可以改变你的网站外观,管理你网站的数据,给网站前台增加页面,文章,视频,图片或者其他功能. 通过WordPress建 ...

  4. Perl按行分割文件

    Perl按行分割文件 将一个文件按照行数,均等的分割成多个小文件,例如,一个550行的文件,分割为每个文件有100行,则将分割为6个小文件 运行结果 参考代码(split_file.pl) #!/us ...

  5. 用Java对CSV文件进行读写操作

    需要jar包:javacsv-2.0.jar 读操作 // 读取csv文件的内容 public static ArrayList<String> readCsv(String filepa ...

  6. Java基本数据类型的取值范围

    版权声明:本文为博主原创文章,未经博主允许不得转载. 先看一段代码public class Hello{    public static void main(String[] args){      ...

  7. 【前端统计图】echarts实现简单柱状图

    图片.png <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <ti ...

  8. Android 仿微信朋友圈点击图片变暗

    package cn.eoe.leigo.view; import android.content.Context; import android.graphics.Bitmap; import an ...

  9. HashTable 解决碰撞(冲突)的方法 —— 分离链接法(separate chaining)

    1. ListNode 及 HashTable 的类型声明 声明 typedef int ElementType; typedef unsigned int Index; struct ListNod ...

  10. NOIP模拟 Date - Tarjan

    题目描述 小Y和小Z好不容易有机会相见啦,可是邪恶的小H却不想让他们相见.现在有一些城市,城市之间有双向路径相连,有路径相连的城市之间可以互相到达.小H可以任意选择一条路径,然后用他的邪恶力量污染这条 ...