Create a gist now

Instantly share code, notes, and snippets.

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