login and register

This commit is contained in:
2017-10-01 23:51:59 +03:00
parent dca2c7a71c
commit 9f9274acf5
23 changed files with 411 additions and 329 deletions

View File

@@ -15,6 +15,7 @@ import android.widget.TextView;
import ch.pizzalink.android.R;
import ch.pizzalink.android.activity.BaseActivity;
import ch.pizzalink.android.helper.PasswordHelper;
/**
* Created by cimenmus on 28/09/2017.
@@ -98,23 +99,33 @@ public class PizzalinkEditText extends LinearLayout implements View.OnClickListe
}
private void hideShowPassword(){
if(isPasswordHidden)
editText.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
else
editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
isPasswordHidden = !isPasswordHidden;
editText.setTypeface(typeFace);
}
private void focusEditText(){
editText.requestFocus();
InputMethodManager inputMethodManager=(InputMethodManager)BaseActivity.currentActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_FORCED,0);
}
public boolean isEmpty(){
return editText.getText().toString().isEmpty();
}
public boolean isEmail(){
return PasswordHelper.EMAIL_ADDRESS_PATTERN.matcher(editText.getText()).matches();
}
public String getText(){
return editText.getText().toString();
}
public TextView getHintTextView() {
return hintTextView;
}