FileDocCategorySizeDatePackage
BrowserSearchpagePreference.javaAPI DocAndroid 1.5 API2427Wed May 06 22:42:42 BST 2009com.android.browser

BrowserSearchpagePreference

public class BrowserSearchpagePreference extends android.preference.EditTextPreference implements android.text.TextWatcher

Fields Summary
Constructors Summary
public BrowserSearchpagePreference(android.content.Context context, android.util.AttributeSet attrs, int defStyle)

        super(context, attrs, defStyle);
        getEditText().addTextChangedListener(this);
    
public BrowserSearchpagePreference(android.content.Context context, android.util.AttributeSet attrs)

        super(context, attrs);
        getEditText().addTextChangedListener(this);
    
public BrowserSearchpagePreference(android.content.Context context)

        super(context);
        getEditText().addTextChangedListener(this);
    
Methods Summary
public voidafterTextChanged(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 voidbeforeTextChanged(java.lang.CharSequence s, int start, int count, int after)

    
public voidonTextChanged(java.lang.CharSequence s, int start, int before, int count)