Source:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ApplicationlessInjection .getInstance(this.getApplicationContext()) .getCommonsApplicationComponent() .inject(this); boolean isDarkTheme = defaultKvStore.getBoolean("theme", false); setTheme(isDarkTheme ? R.style.DarkAppTheme : R.style.LightAppTheme); getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); setContentView(R.layout.activity_login); ButterKnife.bind(this); usernameEdit.addTextChangedListener(textWatcher); usernameEdit.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } }); passwordEdit.addTextChangedListener(textWatcher); passwordEdit.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } }); twoFactorEdit.addTextChangedListener(textWatcher); passwordEdit.setOnEditorActionListener(newLoginInputActionListener()); loginButton.setOnClickListener(view -> performLogin()); signupButton.setOnClickListener(view -> signUp()); forgotPasswordText.setOnClickListener(view -> forgotPassword()); skipLoginText.setOnClickListener(view -> new AlertDialog.Builder(this).setTitle(R.string.skip_login_title) .setMessage(R.string.skip_login_message) .setCancelable(false) .setPositiveButton(R.string.yes, (dialog, which) -> { dialog.cancel(); skipLogin(); }) .setNegativeButton(R.string.no, (dialog, which) -> dialog.cancel()) .show()); if (ConfigUtils.isBetaFlavour()) { loginCredentials.setText(getString(R.string.login_credential)); } else { loginCredentials.setVisibility(View.GONE); } getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); }

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ApplicationlessInjection .getInstance(this.getApplicationContext()) .getCommonsApplicationComponent() .inject(this); boolean isDarkTheme = applicationKvStore.getBoolean("theme", false); setTheme(isDarkTheme ? R.style.DarkAppTheme : R.style.LightAppTheme); getDelegate().installViewFactory(); getDelegate().onCreate(savedInstanceState); setContentView(R.layout.activity_login); ButterKnife.bind(this); usernameEdit.addTextChangedListener(textWatcher); usernameEdit.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } }); passwordEdit.addTextChangedListener(textWatcher); passwordEdit.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } }); twoFactorEdit.addTextChangedListener(textWatcher); passwordEdit.setOnEditorActionListener(newLoginInputActionListener()); loginButton.setOnClickListener(view -> performLogin()); signupButton.setOnClickListener(view -> signUp()); forgotPasswordText.setOnClickListener(view -> forgotPassword()); skipLoginText.setOnClickListener(view -> new AlertDialog.Builder(this).setTitle(R.string.skip_login_title) .setMessage(R.string.skip_login_message) .setCancelable(false) .setPositiveButton(R.string.yes, (dialog, which) -> { dialog.cancel(); skipLogin(); }) .setNegativeButton(R.string.no, (dialog, which) -> dialog.cancel()) .show()); if (ConfigUtils.isBetaFlavour()) { loginCredentials.setText(getString(R.string.login_credential)); } else { loginCredentials.setVisibility(View.GONE); } getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); }