Small drawing optimisation

This commit is contained in:
SerpentSpirale 2021-09-07 17:00:34 +02:00 committed by SerpentSpirale
parent 47f467e705
commit b32123ba58

View File

@ -144,6 +144,12 @@ public class ControlButton extends androidx.appcompat.widget.AppCompatButton imp
setVisibility(isVisible ? VISIBLE : GONE);
}
@Override
protected void onVisibilityChanged(View changedView, int visibility) {
super.onVisibilityChanged(changedView, visibility);
setWillNotDraw(visibility == GONE);
}
@Override
public void setX(float x) {
super.setX(x);