Bootstrap Edit 使用方法
Getting Started
<!-- rounded edit text -->
<com.beardedhen.androidbootstrap.BootstrapEditText
android:id="@+id/txtOne"
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:hint="rounded"
bootstrapbutton:be_roundedCorners="true"
android:gravity="center"
bootstrapbutton:be_state="success"
/>
The above code inserts a rounded bootstrap edit text with the state set to be succesfull. The following attributes can be added:
bootstrapbutton:be_state="success"
The state of the Bootstrap Edit Text e.g. warning, danger, success. Leave blank for default state.
bootstrapbutton:be_roundedCorners="true"
Whether the Bootstrap Edit Text should have rounded corners
- and all the other variables for a typical edit text!
You can also change the Bootstrap Edit Text programmatically!
txtItem.setEnabled(false);
change whether the edit text is enabled or disabled!
txtItem.setState("default");
change the state of the Bootstrap Edit Text from warning, danger, success, or default.
txtItem.setSuccess();
change the state of the Bootstrap Edit Text to success
txtItem.setWarning();
change the state of the Bootstrap Edit Text to warning
txtItem.setDanger();
change the state of the Bootstrap Edit Text to danger
txtItem.setDefault();
change the state of the Bootstrap Edit Text to default
- and all the functions for a typical edit text.
- Note: You can also set up listeners and interact as per regular edit texts
最新文章
- 别再抱怨了,国内这么多优秀的Android资源你都知道吗?
- .NET LINQ基本查询操作
- cocos2dx阴影层的实现
- android ListView详解继承ListActivity
- dom core,html dom,css dom,jquery 中的dom操作
- 使用ContentProvider管理联系人------搜索联系人
- Logstash最佳实践
- POJ1837 Balance(DP)
- Codeforces Round #340 (Div. 2) C. Watering Flowers 暴力
- 第三十篇、iOS开发中常用的宏
- C++中new和不new的区别
- 9张思维导图学习Javascript
- MYSQL死锁
- Linux shell中的一个问题 ${}带正则匹配的表达式
- sqlserver 存储过程实例
- 在toolbar里动态创建多个button(ext.net)
- Git - error: RPC failed; result=22, HTTP code = 401 fatal: The remote end hung up unexpectedly
- C#Session丢失问题的解决办法
- tox环境安装
- php list()函数