Code example for ImageView

Methods: invalidate

     * Invalidates the pressed/focused states. 
    void invalidatePressedFocusedStates(ImageView v) {
        mStatesUpdated = false;
        if (v != null) {
     * Creates a new press state image which is the old image with a blue overlay. 
     * Responsibility for the bitmap is transferred to the caller. 
    private Bitmap createPressImage(ImageView v, Canvas canvas) {
        final int padding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS;
        final Bitmap b = Bitmap.createBitmap(
                v.getWidth() + padding, v.getHeight() + padding, Bitmap.Config.ARGB_8888);
Experience pair programming with AI  Get Codota for Java