Reduced memory consumption caused by subButton

This commit is contained in:
SerpentSpirale 2021-09-06 18:03:22 +02:00 committed by SerpentSpirale
parent 29b7aeb999
commit 7ec533a997
3 changed files with 5 additions and 4 deletions

View File

@ -146,7 +146,10 @@ public class ControlLayout extends FrameLayout
view.setAlpha(view.getProperties().opacity); view.setAlpha(view.getProperties().opacity);
view.setFocusable(false); view.setFocusable(false);
view.setFocusableInTouchMode(false); view.setFocusableInTouchMode(false);
}else{
view.setVisible(drawer.areButtonsVisible);
} }
drawer.addButton(view); drawer.addButton(view);
addView(view); addView(view);

View File

@ -20,9 +20,7 @@ public class ControlSubButton extends ControlButton {
super(layout, properties); super(layout, properties);
this.parentDrawer = parentDrawer; this.parentDrawer = parentDrawer;
//Delayed to let the button inflate first
if(!layout.getModifiable())
new Handler(Looper.getMainLooper()).postDelayed(() -> setVisibility(parentDrawer.areButtonsVisible ? VISIBLE : GONE), 0);
filterProperties(); filterProperties();
} }

View File

@ -43,7 +43,7 @@ public class ActionPopupWindow extends PinnedPopupWindow implements OnClickListe
private TextView mDeleteTextView; private TextView mDeleteTextView;
private TextView mCloneTextView; private TextView mCloneTextView;
private ControlButton editedButton; private final ControlButton editedButton;
public ActionPopupWindow(HandleView handleView, ControlButton button){ public ActionPopupWindow(HandleView handleView, ControlButton button){
super(handleView); super(handleView);