- [Custom controls] Bug fixes
- Update README.md
This commit is contained in:
khanhduytran0
2020-11-23 12:58:27 +07:00
parent 7034b61c77
commit 4bff91e3f6
3 changed files with 20 additions and 23 deletions

View File

@@ -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();
}

View File

@@ -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;