android-boostrap

        之前在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"/>

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

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

转载于:https://my.oschina.net/gal/blog/200172

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值