mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-10-03 10:57:19 -04:00
Changes
- [Custom controls] Bug fixes - Update README.md
This commit is contained in:
1 parent
7034b61c77
commit
4bff91e3f6
3 files changed
+20
-23
No files matched your search
@@ -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