mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 16:47:14 -04:00
The subButton is now properly hidden on launch
This commit is contained in:
parent
4de83829fa
commit
659563d3f8
@ -18,7 +18,7 @@ public class ControlDrawer extends ControlButton {
|
||||
public ArrayList<ControlSubButton> buttons;
|
||||
public ControlDrawerData drawerData;
|
||||
public ControlLayout mLayout;
|
||||
private boolean areButtonsVisible = false;
|
||||
public boolean areButtonsVisible = false;
|
||||
|
||||
|
||||
public ControlDrawer(ControlLayout layout, ControlDrawerData drawerData) {
|
||||
|
@ -1,5 +1,9 @@
|
||||
package net.kdt.pojavlaunch.customcontrols;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public class ControlSubButton extends ControlButton {
|
||||
|
||||
public ControlDrawer parentDrawer;
|
||||
@ -7,6 +11,10 @@ public class ControlSubButton extends ControlButton {
|
||||
public ControlSubButton(ControlLayout layout, ControlData properties, ControlDrawer parentDrawer) {
|
||||
super(layout, properties);
|
||||
this.parentDrawer = parentDrawer;
|
||||
|
||||
//Delayed to let the button inflate first
|
||||
new Handler(Looper.getMainLooper()).postDelayed(() -> setVisibility(parentDrawer.areButtonsVisible ? VISIBLE : GONE), 0);
|
||||
|
||||
filterProperties();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user