Пример #1
0
 /** 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());
   }
 }
Пример #2
0
 /**
  * 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();
   }
 }
Пример #3
0
 void setDisplayTitle(String title) {
   if (!isEditingUrl()) {
     mUrlInput.setText(title, false);
   }
 }