android-boostrap
16lz
2021-01-26
之前在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研究
更多相关文章
- android UI编程
- 【Android】 桌面图标右上角显示数字(角标)
- Android(安卓)APP原型图设计规范
- 【Android】模拟Android微信APK底部的TabHost选项卡
- 【Android(安卓)初学】4、RadioButton & CheckBox
- Android自定义dialog主题样式解析
- Android(安卓)Internet应用实现获取天气预报的示例代码
- 新建Android项目出现错误
- ADT的安装和配置