/** callback from the suggestion dropdown copy text to input field and stay in edit mode */ @Override public void onCopySuggestion(String text) { mUrlInput.setText(text, true); if (text != null) { mUrlInput.setSelection(text.length()); } }
/** * called from the Ui when the user wants to edit * * @param clearInput clear the input field */ void startEditingUrl(boolean clearInput) { // editing takes preference of progress setVisibility(View.VISIBLE); if (mTitleBar.useQuickControls()) { mTitleBar.getProgressView().setVisibility(View.GONE); } if (!mUrlInput.hasFocus()) { mUrlInput.requestFocus(); } if (clearInput) { mUrlInput.setText(""); } else if (mInVoiceMode) { mUrlInput.showDropDown(); } }
void setDisplayTitle(String title) { if (!isEditingUrl()) { mUrlInput.setText(title, false); } }