Code example for AlertDialog

Methods: getButton

0
            applyButtonStyle(ctx, dialog.getButton(DialogInterface.BUTTON_NEUTRAL));
            applyButtonStyle(ctx, dialog.getButton(DialogInterface.BUTTON_POSITIVE));
        } 
 
        /** 
         * Method that apply the current style to a button 
         * 
         * @param ctx The current context 
         * @param button The button which apply the style 
         */ 
        private void applyButtonStyle(Context ctx, Button button) {
            if (button != null) {
                setBackgroundDrawable(ctx, button, "selectors_button_drawable"); //$NON-NLS-1$
                setTextColor(ctx, button, "text_color"); //$NON-NLS-1$
            } 
        } 
 
        /** 
         * {@inheritDoc} 
         */ 
        @Override