List of usage examples for android.view Display getWidth
@Deprecated public int getWidth()
From source file:Main.java
@SuppressWarnings("deprecation") private static void getDisplaySizeV9(Display display, Point outSize) { outSize.x = display.getWidth(); outSize.y = display.getHeight();//w w w .j a va 2s .c o m }
From source file:Main.java
public static float getWindowWidth(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
public static String getResolution(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); return display.getWidth() + "*" + display.getHeight(); }
From source file:Main.java
public static int getScrWidth(Context context) { WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
public static int getWindowWidth(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
public static int getScreenWith(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
public static int getScreenWidth(Activity activity) { WindowManager manager = activity.getWindowManager(); Display display = manager.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
@SuppressWarnings("deprecation") public static int getScreenWidth(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); return display.getWidth(); }
From source file:Main.java
public static int getDisplayWidthPixel12AndBefore(@NonNull Display display) { //noinspection deprecation return display.getWidth(); }
From source file:Main.java
public static int getScreenWidth(Context context) { WindowManager manager = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); Display display = manager.getDefaultDisplay(); return display.getWidth(); }