Fix ToolApp edge strips blocking buttons
This commit is contained in:
@@ -1088,20 +1088,29 @@ FloatBallAppWM.prototype.buildToolAppShell = function(contentView, title, canBac
|
|||||||
hostLp.setMargins((spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6), 0, (spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6), (spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6));
|
hostLp.setMargins((spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6), 0, (spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6), (spec && (spec.isExpandedWidth || spec.isWideWidth)) ? this.dp(4) : this.dp(6));
|
||||||
body.addView(host, hostLp);
|
body.addView(host, hostLp);
|
||||||
|
|
||||||
|
// 自定义边缘返回热区会覆盖左右边缘的真实按钮(返回、关闭、添加、保存装扮等)。
|
||||||
|
// 默认不再叠加透明触摸层;需要排查预测返回时再显式开启。
|
||||||
try {
|
try {
|
||||||
var stripW = this.getToolAppBackEdgeWidthPx ? this.getToolAppBackEdgeWidthPx() : this.dp(48);
|
var enableInnerBackStrip = false;
|
||||||
var leftStrip = this.createToolAppEdgeBackStrip(0);
|
try { enableInnerBackStrip = (String(this.config.ENABLE_TOOLAPP_INNER_BACK_STRIPS || "false") === "true"); } catch(eCfg) { enableInnerBackStrip = false; }
|
||||||
var leftLp = new android.widget.FrameLayout.LayoutParams(stripW, -1);
|
if (enableInnerBackStrip) {
|
||||||
leftLp.gravity = android.view.Gravity.START | android.view.Gravity.TOP;
|
var stripW = this.getToolAppBackEdgeWidthPx ? this.getToolAppBackEdgeWidthPx() : this.dp(24);
|
||||||
leftLp.topMargin = topBarHeight + this.dp(8);
|
var leftStrip = this.createToolAppEdgeBackStrip(0);
|
||||||
root.addView(leftStrip, leftLp);
|
var leftLp = new android.widget.FrameLayout.LayoutParams(stripW, -1);
|
||||||
var rightStrip = this.createToolAppEdgeBackStrip(1);
|
leftLp.gravity = android.view.Gravity.START | android.view.Gravity.TOP;
|
||||||
var rightLp = new android.widget.FrameLayout.LayoutParams(stripW, -1);
|
leftLp.topMargin = topBarHeight + this.dp(8);
|
||||||
rightLp.gravity = android.view.Gravity.END | android.view.Gravity.TOP;
|
root.addView(leftStrip, leftLp);
|
||||||
rightLp.topMargin = topBarHeight + this.dp(8);
|
var rightStrip = this.createToolAppEdgeBackStrip(1);
|
||||||
root.addView(rightStrip, rightLp);
|
var rightLp = new android.widget.FrameLayout.LayoutParams(stripW, -1);
|
||||||
this.state.toolAppInnerBackLeftStrip = leftStrip;
|
rightLp.gravity = android.view.Gravity.END | android.view.Gravity.TOP;
|
||||||
this.state.toolAppInnerBackRightStrip = rightStrip;
|
rightLp.topMargin = topBarHeight + this.dp(8);
|
||||||
|
root.addView(rightStrip, rightLp);
|
||||||
|
this.state.toolAppInnerBackLeftStrip = leftStrip;
|
||||||
|
this.state.toolAppInnerBackRightStrip = rightStrip;
|
||||||
|
} else {
|
||||||
|
this.state.toolAppInnerBackLeftStrip = null;
|
||||||
|
this.state.toolAppInnerBackRightStrip = null;
|
||||||
|
}
|
||||||
} catch (eStrip) { safeLog(this.L, 'w', "add edge back strip fail: " + String(eStrip)); }
|
} catch (eStrip) { safeLog(this.L, 'w', "add edge back strip fail: " + String(eStrip)); }
|
||||||
|
|
||||||
this.state.toolAppRoot = root;
|
this.state.toolAppRoot = root;
|
||||||
@@ -1277,10 +1286,12 @@ FloatBallAppWM.prototype.showToolApp = function(route, resetStack) {
|
|||||||
} catch (eUpd) { safeLog(this.L, 'w', "tool_app update layout fail: " + String(eUpd)); }
|
} catch (eUpd) { safeLog(this.L, 'w', "tool_app update layout fail: " + String(eUpd)); }
|
||||||
try { shell.requestFocus(); } catch (eFocus) {}
|
try { shell.requestFocus(); } catch (eFocus) {}
|
||||||
}
|
}
|
||||||
// 竖屏系统边缘 predictive back 在 overlay/Rhino 下可能只能收到最终回调;保留窄屏幕边缘 fallback,
|
// 不再默认添加屏幕边缘透明覆盖层:它会抢占 ToolApp 顶栏/内容区左右边缘按钮的触摸。
|
||||||
// 复用现有 ToolApp 返回预览栈,拖动时实时露出上一级 UI。宽度由 TOOLAPP_BACK_EDGE_WIDTH_DP 控制,默认 22dp。
|
// 如需临时排查返回手势,可把 ENABLE_TOOLAPP_SCREEN_BACK_STRIPS 设为字符串 "true"。
|
||||||
try {
|
try {
|
||||||
if (this.hasToolAppBackTarget && this.hasToolAppBackTarget()) this.showToolAppScreenBackStrips();
|
var enableScreenBackStrip = false;
|
||||||
|
try { enableScreenBackStrip = (String(this.config.ENABLE_TOOLAPP_SCREEN_BACK_STRIPS || "false") === "true"); } catch(eCfg2) { enableScreenBackStrip = false; }
|
||||||
|
if (enableScreenBackStrip && this.hasToolAppBackTarget && this.hasToolAppBackTarget()) this.showToolAppScreenBackStrips();
|
||||||
else this.hideToolAppScreenBackStrips();
|
else this.hideToolAppScreenBackStrips();
|
||||||
} catch (eScreenBack) { safeLog(this.L, 'w', "screen edge back strip update fail: " + String(eScreenBack)); }
|
} catch (eScreenBack) { safeLog(this.L, 'w', "screen edge back strip update fail: " + String(eScreenBack)); }
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -58,8 +58,8 @@
|
|||||||
"size": 294962
|
"size": 294962
|
||||||
},
|
},
|
||||||
"th_15_extra.js": {
|
"th_15_extra.js": {
|
||||||
"sha256": "5084f4db1afd0e681fbdf291adbc10df44eccb43775e86ed1cbe0b8f0e49a25a",
|
"sha256": "11294f672edc0cf85cc662211d73a234301c252f2fa062e8c4b52a2cd3fd8c74",
|
||||||
"size": 105271
|
"size": 106043
|
||||||
},
|
},
|
||||||
"th_16_entry.js": {
|
"th_16_entry.js": {
|
||||||
"sha256": "6c59d9891cd010647f84c3db93f1cf95c7bbfb758470ea21044bf72eb8ff73d1",
|
"sha256": "6c59d9891cd010647f84c3db93f1cf95c7bbfb758470ea21044bf72eb8ff73d1",
|
||||||
@@ -68,5 +68,5 @@
|
|||||||
},
|
},
|
||||||
"keyId": "toolhub-targets-2026-rsa3072",
|
"keyId": "toolhub-targets-2026-rsa3072",
|
||||||
"schema": 2,
|
"schema": 2,
|
||||||
"version": 20260521204038
|
"version": 20260521205945
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
XJPl0OJwoiPUCu5a2JUmaeaAW4j1Eet5CNOW8jFBom4DtoIbpavxvk8nIub1QkDnPX71reXt8nfspunPp+tFfe/f5hL5+zw9FCerduSA9fWsDz6GzimXe2iywSWzlI/XMHModCAA+HQnNmuYuR+YdjI295uAG7f972+Ecyd6J91JJzx0DbQww3FuvxmmDZW1MyFBkQbyIolJUrvhuNnaCZGEDCnO5KKnXmYguoPQ2HwbYFQ/o7YWJtaAbdqbwQ9TLeRFxKm7eiXRIKzT1PgrMfd+AJcTizfugBhv5EV4EgDtWN6hoRF+0TXIZ3PEhdxUoDrcuxivJ/IisP+MtDBH3pgyRlDXMT8osHhiPJnBhcEmydNoLYFDhP6n6g8SQICvUgNgh4PaHEuQ0Fu6kiYjodvQKNgr1hTuvv0VMrNyOcWa8z2c+bx6tIDVPtwa+9wonEgul0Ub1dchmBz0u4L49D0s9IrFbXJGXxsBjIOJTGyqwF+oeQautymOlqhmcHnF
|
NgnUXqGR4ldz62G8+pQBYI2C+RXgU06Tuy9BlhXswjiyDCcRUgON/nMLk4Vo99qeDHgrvyG/sqeE2RAUBAFWmBJbEF0t1Wbo/rBV43CviYaHthC7P/5mt17oA7Z2jU5L67wT9l4CvZ5qQ0a0R/7dUinAjUt2WLV23ZAZOp+RuEXP29x6VSuh+HmGa01sP4Rg/kZn2HL+mv5nQ67ZcIZBjEoxPYIbXlnUnlVGzaN8CqtBgkB5AE+IODjkBfA3Mrkn/n6nzUOnmpYNBCLEsQuQ/P3yhTiX4NqYvD2PFxViJWsivzDKvQcWbOxqRd3QGk8GwVt8/FOZnj29sUTUz9s+qIFz0MdWSyMXAH0NVtOyxNcz+pjIWtCdj7lhbgcOTJtz1Keqvv6fbBbpe92Q+e5+egusOTUzjWZIStnqygPSjvsV/jOxt7gFhBthujoLgZ2VfQdP/yXZ2uMLen1RO4kPwfgO37NYXYFodMgbqlopR8KJziMN5fM5/k+C4BaX+KPU
|
||||||
|
|||||||
Reference in New Issue
Block a user