android-boostrap
2020-07-13 04:16
357 查看
之前在github发现的一个很酷的android界面库 android-boostrap ,里面包括了一些boostrap样式的按钮(Bootstrap v3),输入框,略缩图背景样式,而且还支持Font Awesome v4的textview(其实更像是imageview);
效果图:
其中的BootstrapButton和BootstrapEditText比较有利用价值,在不同版本的android系统下可以保持统一的风格。
我们可以很方便的在layout中引用他们,例如:
<com.beardedhen.androidbootstrap.BootstrapEditText
android: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.BootstrapButton
android: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"/>
[/code]
icon属性中我们可以设置Font Awesome中的各种icon,具体可以从该页面中中获取:http://fortawesome.github.io/Font-Awesome/cheatsheet/
而具体的使用技巧可以到github主页中下载sample研究
转载于:https://my.oschina.net/gal/blog/200172
相关文章推荐
- android-boostrap
- android&nbsp;打开扬声器zz
- android 扫描某个包下的所有class文件
- Android 回调机制学习之 Callback
- Android使用自带JSONObject解析JSON数据 - jCuckoo的专栏 - 博客频道 - CSDN.NET
- android五大布局详解
- Android开发中那些问题(一)
- Android ListView完全解析
- Android 病毒分析报告与技巧
- Android中消息系统模型和Handler Looper
- 【Android测试之Monkey】
- android Bitmap缩放
- android网络请求与页面切换
- Android 开发 Socket 基于UDP通讯
- Android 广播大全 Intent Action 事件
- Android 之 Account
- Understanding User Interface in Android - Part 2: Views(译)
- android的系统升级方法对比
- android 中判断有无网络连接
- Android的多媒体框架OpenCore介绍