List of usage examples for android.content Context getResources
public abstract Resources getResources();
From source file:Main.java
public static float getFloatValue(Context context, int id) { return context.getResources().getDimension(id); }
From source file:Main.java
public static String[] getArrayValue(Context context, int id) { return context.getResources().getStringArray(id); }
From source file:Main.java
private static String[] getStringArray(Context context, int id) { return context.getResources().getStringArray(id); }
From source file:Main.java
public static float getDisplayMetricsDensity(Context context) { density = context.getResources().getDisplayMetrics().density; return density; }
From source file:Main.java
public static int getWindowWidth(Context context) { return context.getResources().getDisplayMetrics().widthPixels; }
From source file:Main.java
public static int getWindowHeight(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static final float dpToPx(Context context, int px) { return context.getResources().getDisplayMetrics().density * px; }
From source file:Main.java
public static String[] getStringArrayFromXML(Context context, int id) { return context.getResources().getStringArray(id); }
From source file:Main.java
public static int getScreenW(Context c) { return c.getResources().getDisplayMetrics().widthPixels; }
From source file:Main.java
public static String getString(Context context, int id) { return context.getResources().getString(id); }