Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 43cf2f79 authored by Sreyas's avatar Sreyas
Browse files

Sets icon invisible when alpha 0 (Cannot be tapped while TaskView modal)

Bug: 155177299
Change-Id: Ibedbc271837441915580577986c10fa3f0de0ae6
parent 42de4ddc
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -21,12 +21,12 @@ import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.view.View;

import androidx.annotation.NonNull;

import com.android.launcher3.FastBitmapDrawable;

import java.util.ArrayList;

import androidx.annotation.NonNull;

/**
 * A view which draws a drawable stretched to fit its size. Unlike ImageView, it avoids relayout
 * when the drawable changes.
@@ -130,4 +130,14 @@ public class IconView extends View {
            mScaleListeners.remove(listener);
        }
    }

    @Override
    public void setAlpha(float alpha) {
        super.setAlpha(alpha);
        if (alpha > 0) {
            setVisibility(VISIBLE);
        } else {
            setVisibility(INVISIBLE);
        }
    }
}