Skip to content

Commit

Permalink
Squashed 'libs/login/' changes from cfc0675d21..a3a1c83492
Browse files Browse the repository at this point in the history
a3a1c83492 Merge pull request #37 from wordpress-mobile/merge/woocommerce-android/dark-mode
990df9483d Merge pull request #40 from wordpress-mobile/fix/9905_Crash_InflateException_Binary_XML_file_line_NEW
dfd3ed8246 Fix password drawable
bf3e2f3228 Merge pull request #38 from wordpress-mobile/fix/11307-The-wrong-icon-is-used-when-a-Password-is-visible
1428361e69 Merge pull request #39 from wordpress-mobile/merge/WordPress-Android/11934-take2
b77a144e99 using getViewLifecycleOwner() for observers
e2f7c1cdee Replace wrong icon with the right one

git-subtree-dir: libs/login
git-subtree-split: a3a1c834921064c31840003aaa91e4bf8f4f91fc
  • Loading branch information
AmandaRiu committed Jun 10, 2020
1 parent d4d2d89 commit 46923a9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ public void onActivityCreated(@Nullable Bundle savedInstanceState) {

mLoginSiteAddressValidator = new LoginSiteAddressValidator();

mLoginSiteAddressValidator.getIsValid().observe(this, new Observer<Boolean>() {
mLoginSiteAddressValidator.getIsValid().observe(getViewLifecycleOwner(), new Observer<Boolean>() {
@Override public void onChanged(Boolean enabled) {
getPrimaryButton().setEnabled(enabled);
}
});
mLoginSiteAddressValidator.getErrorMessageResId().observe(this, new Observer<Integer>() {
mLoginSiteAddressValidator.getErrorMessageResId().observe(getViewLifecycleOwner(), new Observer<Integer>() {
@Override public void onChanged(Integer resId) {
if (resId != null) {
showError(resId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ private void init(Context context, AttributeSet attrs) {
mEditText.setHintTextColor(getResources().getColor(android.R.color.transparent));
}
if (a.hasValue(R.styleable.wpLoginInputRow_passwordToggleEnabled)) {
mTextInputLayout.setPasswordVisibilityToggleEnabled(
a.getBoolean(R.styleable.wpLoginInputRow_passwordToggleEnabled, false));
mTextInputLayout.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE);
mTextInputLayout.setEndIconDrawable(R.drawable.selector_password_visibility);
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 46923a9

Please sign in to comment.