Code example for Button

Methods: requestFocus

        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) {
        protected void onQueryComplete(int token, Object cookie, Cursor c) {
        protected void onInsertComplete(int token, Object cookie,
                                        Uri uri) {
Connect your IDE to all the code out there  Get Codota for Java