use of com.waz.zclient.controllers.tracking.events.profile.ResetPassword in project wire-android by wireapp.
the class EmailSignInFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_signin__with_email, viewGroup, false);
guidedEditTextEmail = ViewUtils.getView(view, R.id.get__sign_in__email);
guidedEditTextPassword = ViewUtils.getView(view, R.id.get__sign_in__password);
resetPasswordTextView = ViewUtils.getView(view, R.id.ttv_signin_forgot_password);
tabIndicatorLayout = ViewUtils.getView(view, R.id.til__app_entry);
textViewGoToPhoneSignIn = ViewUtils.getView(view, R.id.ttv__new_reg__sign_in__go_to__phone);
signInButton = ViewUtils.getView(view, R.id.pcb__signin__email);
buttonBack = ViewUtils.getView(view, R.id.ll__activation_button__back);
// as there is supposed to be another version of the signup screen in 12.2015
// I am keeping the basic structure of the layouts and I am switching the elements
// that are not visible so far
buttonBack.setVisibility(View.GONE);
guidedEditTextEmail.setResource(R.layout.guided_edit_text_sign_in__email);
guidedEditTextEmail.setValidator(EmailValidator.newInstanceAcceptingEverything());
guidedEditTextEmail.getEditText().addTextChangedListener(this);
guidedEditTextPassword.setResource(R.layout.guided_edit_text_sign_in__password);
guidedEditTextPassword.setValidator(PasswordValidator.instanceLegacy(getActivity()));
guidedEditTextPassword.getEditText().addTextChangedListener(this);
guidedEditTextPassword.getEditText().setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_DONE) {
signIn();
return true;
} else {
return false;
}
}
});
// reset password
resetPasswordTextView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getContainer().onOpenUrl(getResources().getString(R.string.url_password_reset));
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new ResetPassword(ResetPassword.Location.FROM_SIGN_IN));
}
});
return view;
}
Aggregations