Bootstrap edit usage

Source: Internet
Author: User
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 shocould 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.