List of usage examples for android.content Context WINDOW_SERVICE
String WINDOW_SERVICE
To view the source code for android.content Context WINDOW_SERVICE.
Click Source Link
From source file:Main.java
public static int[] getScreenParams(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return new int[] { wm.getDefaultDisplay().getWidth(), wm.getDefaultDisplay().getHeight() }; }
From source file:Main.java
public static double getScreenWidth(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return 0.0;/*from w w w .j av a 2 s . c om*/ }
From source file:Main.java
public static WindowManager getWindowManager(Context paramContext) { return (WindowManager) paramContext.getSystemService(Context.WINDOW_SERVICE); }
From source file:Main.java
public static int getScreenWidth(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); int width = wm.getDefaultDisplay().getWidth(); int height = wm.getDefaultDisplay().getHeight(); return Math.min(width, height); }
From source file:Main.java
public static int getDeviceWidth(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return manager.getDefaultDisplay().getWidth(); }
From source file:Main.java
public static int getDeviceHeight(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return manager.getDefaultDisplay().getHeight(); }
From source file:Main.java
public static int getScreenWidth(Context context) { WindowManager windowManager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); return windowManager.getDefaultDisplay().getWidth(); }
From source file:Main.java
public static boolean isPopWindowExist(Context mContext) { WindowManager mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE); // mWindowManager. return false; }
From source file:Main.java
public static int getScreenWidth() { WindowManager wm = (WindowManager) sContext.getSystemService(Context.WINDOW_SERVICE); return wm.getDefaultDisplay().getWidth(); }
From source file:Main.java
public static Display getDefaultDisplay(Context context) { return ((WindowManager) context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); }