Code example for DisplayMetrics

Methods: getMetrics

    private boolean needToSearch() { 
        return textAppearance == null || titleAppearance == null;
    private DisplayMetrics getDisplayMetrics() {
        DisplayMetrics metrics = new DisplayMetrics();
        WindowManager wm = (WindowManager) context.getSystemService(WINDOW_SERVICE);
        return metrics;
    public static class TextAppearance { 
        public final int colour;
        public final float size;
        public TextAppearance(int colour, float size) {
            this.colour = colour;
            this.size = size;
Connect your IDE to all the code out there  Get Codota for Java