List of usage examples for android.content Context getResources
public abstract Resources getResources();
From source file:Main.java
public static int getScreenHeightPixels(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static String getLanguage(Context context) { return context.getResources().getConfiguration().locale.getLanguage(); }
From source file:Main.java
public static int getWidth(Context context) { return context.getResources().getDisplayMetrics().widthPixels; }
From source file:Main.java
public static String getLocaleText(Context context) { return context.getResources().getConfiguration().locale.getLanguage(); }
From source file:Main.java
public static int getDeviceHeight(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static float getDensity(Context aContext) { return aContext.getResources().getDisplayMetrics().density; }
From source file:Main.java
public static boolean hasNavBar(Context ctx) { int id = ctx.getResources().getIdentifier("config_showNavigationBar", "bool", "android"); return id > 0 && ctx.getResources().getBoolean(id); }
From source file:Main.java
public static float getPixelDensity(Context context) { return context.getResources().getDisplayMetrics().density; }
From source file:Main.java
public static int getScreenY(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static float getScale(Context context) { return context.getResources().getDisplayMetrics().density; }