get Window Display - Android User Interface

Android examples for User Interface:Window

Description

get Window Display

Demo Code


//package com.java2s;

import android.content.Context;

import android.view.Display;

import android.view.WindowManager;

public class Main {
    public static Display getWindowDisplay(Context context) {
        return ((WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE))
                .getDefaultDisplay();//w  w  w  . j av  a  2 s. c om
    }
}

Related Tutorials