use android:inputType="textEmailAddress" as below:
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="email"
android:inputType="textEmailAddress"
android:id="@+id/email"
/>
and:
boolean isEmailValid(CharSequence email) {
return android.util.Patterns.EMAIL_ADDRESS.matcher(email)
.matches();
}