List of usage examples for android.content Context getResources
public abstract Resources getResources();
From source file:Main.java
public static Integer getEmoticonResId(String emojiUnicode, Context c) { return c.getResources().getIdentifier("emoji_" + emojiUnicode, "drawable", c.getPackageName()); }
From source file:Main.java
public static int deviceDPI(Context c) { return c.getResources().getDisplayMetrics().densityDpi; }
From source file:Main.java
public static int getDisplayHeight(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static int getHeightScreen(Context context) { return context.getResources().getDisplayMetrics().heightPixels; }
From source file:Main.java
public static int getWidthScreen(Context context) { return context.getResources().getDisplayMetrics().widthPixels; }
From source file:Main.java
public static float getDeviceDensity(Context context) { return context.getResources().getDisplayMetrics().density; }
From source file:Main.java
public static int getScreenHeighthDp(Context context) { return context.getResources().getConfiguration().screenHeightDp; }
From source file:Main.java
public static final int getWidthInPx(Context context) { return context.getResources().getDisplayMetrics().widthPixels; }
From source file:Main.java
public static float density(Context context) { return context.getResources().getDisplayMetrics().density; }
From source file:Main.java
public static String getMyCountry(Context context) { return context.getResources().getConfiguration().locale.getLanguage(); }