Source:
public void init(int position) { if (position == 0) { Timber.d("Title is " + title); if (!title.isEmpty()) { descItemEditText.setText(title.toString()); } else { descItemEditText.setText(""); } descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, getInfoIcon(), null); descItemEditText.addTextChangedListener(new AbstractTextWatcher(titleText ->{ title.setTitleText(titleText); titleChangedSubject.onNext(titleText); })); descItemEditText.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } else { uploadView.setTopCardState(false); } }); descItemEditText.setDrawableClickListener(target -> { switch (target) { case RIGHT: if (getAdapterPosition() == 0) { callback.showAlert(R.string.media_detail_title, R.string.title_info); } break; default: break; } }); } else { Description description = descriptions.get(position - 1); Timber.d("Description is " + description); if (!TextUtils.isEmpty(description.getDescriptionText())) { descItemEditText.setText(description.getDescriptionText()); } else { descItemEditText.setText(""); } if (position == 1) { descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, getInfoIcon(), null); } else { descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); } descItemEditText.addTextChangedListener(new AbstractTextWatcher(descriptionText->{ setNewDescription(description,descriptionText,position); })); descItemEditText.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } else { uploadView.setTopCardState(false); } }); descItemEditText.setDrawableClickListener(target -> { switch (target) { case RIGHT: if (getAdapterPosition() == 1) { callback.showAlert(R.string.media_detail_description, R.string.description_info); } break; default: break; } }); initLanguageSpinner(position, description); } }

Target:
public void init(int position) { if (position == 0) { Timber.d("Title is " + title); if (!title.isEmpty()) { descItemEditText.setText(title.toString()); } else { descItemEditText.setText(""); } descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, getInfoIcon(), null); descItemEditText.addTextChangedListener(new AbstractTextWatcher(titleText ->{ title.setTitleText(titleText); titleChangedSubject.onNext(titleText); })); descItemEditText.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } else { uploadView.setTopCardState(false); } }); descItemEditText.setDrawableClickListener(target -> { switch (target) { case RIGHT: if (getAdapterPosition() == 0) { callback.showAlert(R.string.media_detail_title, R.string.title_info); } break; default: break; } }); } else { Description description = descriptions.get(position - 1); Timber.d("Description is " + description); if (!TextUtils.isEmpty(description.getDescriptionText())) { descItemEditText.setText(description.getDescriptionText()); } else { descItemEditText.setText(""); } if (position == 1) { descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, getInfoIcon(), null); } else { descItemEditText.setCompoundDrawablesWithIntrinsicBounds(null, null, null, null); } descItemEditText.addTextChangedListener(new AbstractTextWatcher(descriptionText->{ descriptions.get(position - 1).setDescriptionText(descriptionText); })); descItemEditText.setOnFocusChangeListener((v, hasFocus) -> { if (!hasFocus) { ViewUtil.hideKeyboard(v); } else { uploadView.setTopCardState(false); } }); descItemEditText.setDrawableClickListener(target -> { switch (target) { case RIGHT: if (getAdapterPosition() == 1) { callback.showAlert(R.string.media_detail_description, R.string.description_info); } break; default: break; } }); initLanguageSpinner(position, description); } }