Code example for Activity

Methods: getWindow

0
 
    public static final String ERROR_DIALOG_TITLE_RESOURCE = "droidfu_error_dialog_title";
 
    // FIXME: this method currently doesn't work as advertised 
    public static int getWindowFeatures(Activity activity) {
        Window window = activity.getWindow();
        if (window == null) {
            return 0; 
        } 
        try { 
            // Method m = 
            // activity.getWindow().getClass().getMethod("getFeatures"); 
            // Method[] m = window.getClass().getMethods(); 
            // m.setAccessible(true); 
            // return (Integer) m.invoke(window); 
            return 0; 
        } catch (Exception e) {
            return 0; 
        } 
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE