Example usage for android.content Context getResources

List of usage examples for android.content Context getResources

Introduction

In this page you can find the example usage for android.content Context getResources.

Prototype

public abstract Resources getResources();

Source Link

Document

Returns a Resources instance for the application's package.

Usage

From source file:Main.java

public static int getHeight(Context context) {
    return context.getResources().getDisplayMetrics().heightPixels;
}

From source file:Main.java

public static int getScreenWidth(Context context) {
    return context.getResources().getDisplayMetrics().widthPixels;
}

From source file:Main.java

public static boolean isLocalelKorea(Context context) {
    return context.getResources().getConfiguration().locale.getLanguage().equalsIgnoreCase("ko");
}

From source file:Main.java

public static float getScaledDensity(Context context) {
    return context.getResources().getDisplayMetrics().scaledDensity;
}

From source file:Main.java

public static int getScreenDensityDpi(Context context) {
    return context.getResources().getDisplayMetrics().densityDpi;
}

From source file:Main.java

public static int getScreenHeight(Context context) {
    return context.getResources().getDisplayMetrics().heightPixels;
}

From source file:Main.java

public static int getScreenDestiny(Context context) {
    return context.getResources().getDisplayMetrics().densityDpi;
}

From source file:Main.java

public static int getScreenHeightpx(Context context) {
    return context.getResources().getDisplayMetrics().heightPixels;
}

From source file:Main.java

public static int getDeviceWidth(Context context) {
    return context.getResources().getDisplayMetrics().widthPixels;
}

From source file:Main.java

public static int getScreenWidthPixels(Context context) {
    return context.getResources().getDisplayMetrics().widthPixels;
}