mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-22 10:37:16 -04:00
Changes
- [Custom controls] Bug fixes - Update README.md
This commit is contained in:
@@ -100,14 +100,13 @@ public class CustomCtrlMainActivity extends BaseMainActivity {
|
||||
= mTouchListener;
|
||||
|
||||
mControlLayout = findViewById(R.id.main_control_layout);
|
||||
mControlLayout.setModifiable(false);
|
||||
try {
|
||||
mControlLayout.loadLayout(LauncherPreferences.PREF_DEFAULTCTRL_PATH);
|
||||
} catch (Throwable th) {
|
||||
Tools.showError(this, th);
|
||||
}
|
||||
|
||||
mControlLayout.setModifiable(false);
|
||||
|
||||
// toggleGui(null);
|
||||
mControlLayout.toggleControlVisible();
|
||||
}
|
||||
|
||||
@@ -38,11 +38,8 @@ public class ControlLayout extends FrameLayout
|
||||
}
|
||||
|
||||
public void loadLayout(CustomControls controlLayout) {
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
View v = getChildAt(i);
|
||||
if (v instanceof ControlButton) {
|
||||
removeControlButton((ControlButton) v);
|
||||
}
|
||||
if (mModifiable) {
|
||||
removeAllViews();
|
||||
}
|
||||
|
||||
mLayout = controlLayout;
|
||||
|
||||
Reference in New Issue
Block a user