Skip to content

Instantly share code, notes, and snippets.

@vekexasia
Created May 26, 2012 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vekexasia/e2237075076a68780dc8 to your computer and use it in GitHub Desktop.
Save vekexasia/e2237075076a68780dc8 to your computer and use it in GitHub Desktop.
Post#1 Form EditText
<com.andreabaccega.widget.FormEditText
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:editTextFormExample="http://schemas.android.com/apk/res/com.andreabaccega.edittextformexample"
android:id="@+id/et"
style="@android:style/Widget.EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/hint_email"
android:inputType="textEmailAddress"
editTextFormExample:testType="email" />
public void onClickValidate(View v) {
FormEditText fdt = (FormEditText) findViewById(R.id.et);
if (fdt.testValidity()) {
Toast.makeText(this, ":)", Toast.LENGTH_LONG).show();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment