List of usage examples for android.app Activity getWindowManager
public WindowManager getWindowManager()
From source file:Main.java
public static DisplayMetrics GetScreenSize(Activity act) { DisplayMetrics metrics = new DisplayMetrics(); act.getWindowManager().getDefaultDisplay().getMetrics(metrics); return metrics; }
From source file:Main.java
public static int getHeight(Activity context) { DisplayMetrics dm = new DisplayMetrics(); context.getWindowManager().getDefaultDisplay().getMetrics(dm); int screenHeigt = dm.heightPixels; return screenHeigt; }
From source file:Main.java
public static DisplayMetrics getDisplayMetrics(Activity act) { DisplayMetrics metrics = new DisplayMetrics(); act.getWindowManager().getDefaultDisplay().getMetrics(metrics); return metrics; }
From source file:Main.java
public static int[] getScreenWH(Activity mContext) { DisplayMetrics dm = new DisplayMetrics(); mContext.getWindowManager().getDefaultDisplay().getMetrics(dm); return new int[] { dm.widthPixels, dm.heightPixels }; }
From source file:Main.java
public static int getScreenHeight(Activity mActivity) { DisplayMetrics dm = new DisplayMetrics(); mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.heightPixels; }
From source file:Main.java
public static int getWidth(Activity context) { DisplayMetrics dm = new DisplayMetrics(); context.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; }
From source file:Main.java
public static int getHeightPixels(Activity activity) { DisplayMetrics dm = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.heightPixels; }
From source file:Main.java
public static int getscreenHight(Activity activity) { DisplayMetrics dm = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.heightPixels; }
From source file:Main.java
public static int getscreenWidth(Activity activity) { DisplayMetrics dm = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels; }
From source file:Main.java
public static int getScreenHeightDip(Activity activity) { DisplayMetrics dm = new DisplayMetrics(); activity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.heightPixels; }