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. Python 标准库和第三方库的安装位置、Python 第三方库安装的各种问题及解决

    首先使用 sys 下的 path 变量查看所有的 python 路径: import sys sys.path 标准库 lib 目录下(home 目录/pythonXX.XX/lib) 第三方库 在 ...

  2. 在Excel中粘贴时怎样跳过隐藏行

    http://www.excel123.cn/Article/exceljichu/201203/932.html 有时在筛选后需要将其他区域中的连续行数据复制粘贴到筛选区域,以替换筛选后的数据.由于 ...

  3. Android JNI编程(二)——C语言的基本数据类型,输出函数,输入函数

    版权声明:本文出自阿钟的博客,转载请注明出处:http://blog.csdn.net/a_zhon/. 目录(?)[+] 在学习C语言数据类型之前,我们先来回顾一下Java中的基本数据类型和其特点 ...

  4. 通过binlog日志统计dml语句,找出操作频繁的表

    mysqlbinlog --no-defaults --base64-output=decode-rows -v -v mysql-bin.000002 |awk '/###/{if($0~/UPDA ...

  5. APPCAN学习笔记002---app高速开发AppCan.cn平台特色

    技术qq交流群:JavaDream:251572072 1.多窗体机制   常见应用仅仅支持单一窗体 2.原生UI与交互支持   大量原生UI与交互支持(如Action Sheet等) 3.第三方开放 ...

  6. [WebGL入门]十三,minMatrix.js和坐标变换矩阵

    注:文章译自http://wgld.org/,原作者杉本雅広(doxas),文章中假设有我的额外说明,我会加上[lufy:],另外,鄙人webgl研究还不够深入,一些专业词语,假设翻译有误,欢迎大家指 ...

  7. Tricks(四十八)—— 注释一段代码

    为 if 的条件判断表达式,传一个永假的语句,来注释一段代码: # Python if False: ... ... ... # C/C++ if (false) { ... ... } 永远不要直接 ...

  8. Scala入门到精通——第二十七节 Scala操纵XML

    本节主要内容 XML 字面量 XML内容提取 XML对象序列化及反序列化 XML文件读取与保存 XML模式匹配 1. XML 字面量 XML是一种很重要的半结构化数据表示方式,眼下大量的应用依赖于XM ...

  9. sparksql json 合并json数据

    java public class Demo { private static SparkConf conf = new SparkConf().setAppName("demo" ...

  10. 【非常高%】【codeforces 733B】Parade

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...