之前在github发现的一个很酷的android界面库android-boostrap,里面包括了一些boostrap样式的按钮(Bootstrap v3),输入框,略缩图背景样式,而且还支持Font Awesome v4的textview(其实更像是imageview);

效果图:



其中的BootstrapButton和BootstrapEditText比较有利用价值,在不同版本的android系统下可以保持统一的风格。


我们可以很方便的在layout中引用他们,例如:

<com.beardedhen.androidbootstrap.BootstrapEditTextandroid:id="@+id/editText_username"android:layout_width="match_parent"android:layout_height="wrap_content"android:layout_margin="14dp"android:layout_toRightOf="@+id/imageView1"android:ems="10"android:hint="@string/user_name"android:singleLine="true"android:text="fans"bootstrapbutton:be_roundedCorners="true"bootstrapbutton:be_state="warning"><com.beardedhen.androidbootstrap.BootstrapButtonandroid:id="@+id/btn_login" android:layout_width="match_parent"android:layout_height="50dp" android:layout_below="@+id/linearLayout1"android:layout_centerHorizontal="true"android:layout_marginLeft="40dp"android:layout_marginRight="40dp"android:text="@string/login" bootstrapbutton:bb_icon_left="fa-check" bootstrapbutton:bb_roundedCorners="true" app:bb_text_gravity="center" bootstrapbutton:bb_type="primary"/>

icon属性中我们可以设置Font Awesome中的各种icon,具体可以从该页面中中获取:http://fortawesome.github.io/Font-Awesome/cheatsheet/

而具体的使用技巧可以到github主页中下载sample研究

更多相关文章

  1. android UI编程
  2. 【Android】 桌面图标右上角显示数字(角标)
  3. Android(安卓)APP原型图设计规范
  4. 【Android】模拟Android微信APK底部的TabHost选项卡
  5. 【Android(安卓)初学】4、RadioButton & CheckBox
  6. Android自定义dialog主题样式解析
  7. Android(安卓)Internet应用实现获取天气预报的示例代码
  8. 新建Android项目出现错误
  9. ADT的安装和配置

随机推荐

  1. Android(安卓)declare-styleable:自定义控
  2. Android(安卓)最火框架XUtils之注解机制
  3. 上传多张图片到服务器
  4. Android(安卓)PreferenceActivity简单使
  5. Android上 ExpandableListActivity及Curs
  6. Android中contentDescription属性作用
  7. Android:控件WebView显示网页
  8. Android(安卓)常见异常简单整理
  9. android用户界面-组件Widget-网格视图Gri
  10. C99标准之宏定义_可变参数宏_#_##