All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.solovyev.android.view.GrayableRelativeLayout Maven / Gradle / Ivy

There is a newer version: 1.1.18
Show newest version
package org.solovyev.android.view;

import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import org.jetbrains.annotations.NotNull;

/**
 * User: serso
 * Date: 4/19/12
 * Time: 12:34 AM
 */
public class GrayableRelativeLayout extends RelativeLayout implements Grayable {

    @NotNull
    private ViewGrayable grayable = new GrayableImpl();

    public GrayableRelativeLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public GrayableRelativeLayout(Context context) {
        super(context);
    }

    @Override
    public void grayOut() {
        grayable.grayOut();
    }

    @Override
    public void grayIn() {
        grayable.grayIn();
    }

    @Override
    protected void dispatchDraw(Canvas canvas) {
        super.dispatchDraw(canvas);

        this.grayable.dispatchDraw(this, canvas);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy