Code example for Button

Methods: requestFocus

0
        public void onFocusChange(View v, boolean hasFocus) { 
            if (hasFocus) { 
                TextView textView = (TextView) v; 
                Selection.selectAll((Spannable) textView.getText()); 
            } 
        } 
    }; 
 
    private class QueryHandler extends AsyncQueryHandler {
        public QueryHandler(ContentResolver cr) {
            super(cr);
        } 
 
        @Override 
        protected void onQueryComplete(int token, Object cookie, Cursor c) {
        } 
 
        @Override 
        protected void onInsertComplete(int token, Object cookie,
                                        Uri uri) {
            if (DBG) log("onInsertComplete");