Code example for Display

Methods: getMetrics

0
     */ 
    private void initDisplaySize() { 
        final WindowManager w = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
        _display = w.getDefaultDisplay();
        final DisplayMetrics dm = new DisplayMetrics();
        _display.getMetrics(dm);
    } 
    // ////////////////////// 
    // Inner and Anonymous Classes 
} 
Contextual code suggestions in your IDE  Get Codota for Java