Code example for Display

Methods: getMetrics

0
            if (display == null) {
                display = Robolectric.newInstanceOf(Display.class);
            } 
 
            displayMetrics = new DisplayMetrics();
            display.getMetrics(displayMetrics);
        } 
        displayMetrics.density = this.density;
        return displayMetrics;
    } 
 
    @Implementation 
    public Drawable getDrawable(int drawableResourceId) throws Resources.NotFoundException {
        ResName resName = getResName(drawableResourceId);
        String qualifiers = getQualifiers();
        DrawableNode drawableNode = resourceLoader.getDrawableNode(resName, qualifiers);
        final DrawableBuilder drawableBuilder = new DrawableBuilder(getResourceLoader().getResourceIndex());
        return drawableBuilder.getDrawable(resName, realResources, drawableNode);
    } 
 
    @Implementation