BrowserSearchpagePreferencepublic class BrowserSearchpagePreference extends android.preference.EditTextPreference implements android.text.TextWatcher
Methods Summary |
---|
public void | afterTextChanged(android.text.Editable s)
AlertDialog dialog = (AlertDialog) getDialog();
// This callback is called before the dialog has been fully constructed
if (dialog != null) {
String string = s.toString();
int length = string.length();
int first = length > 0 ? string
.indexOf(BrowserActivity.QUERY_PLACE_HOLDER) : -1;
int last = length > 0 ? string
.lastIndexOf(BrowserActivity.QUERY_PLACE_HOLDER) : -1;
dialog.getButton(DialogInterface.BUTTON_POSITIVE).setEnabled(
length == 0 || (first > 0 && first == last));
}
| public void | beforeTextChanged(java.lang.CharSequence s, int start, int count, int after)
| public void | onTextChanged(java.lang.CharSequence s, int start, int before, int count)
|
|