get Window Display - Android android.app

Android examples for android.app:Window

Description

get Window Display

Demo Code

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();
  }/*from ww  w  . ja  v  a2s.  c o  m*/

}

Related Tutorials