capacitor-dex-editor 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -127,18 +127,19 @@ public class SmaliEditorActivity extends AppCompatActivity {
|
|
|
127
127
|
|
|
128
128
|
setContentView(root);
|
|
129
129
|
|
|
130
|
-
//
|
|
130
|
+
// 处理安全区域和键盘
|
|
131
131
|
ViewCompat.setOnApplyWindowInsetsListener(root, (v, windowInsets) -> {
|
|
132
|
-
Insets
|
|
132
|
+
Insets systemBars = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
133
|
+
Insets ime = windowInsets.getInsets(WindowInsetsCompat.Type.ime());
|
|
133
134
|
|
|
134
135
|
// 更新顶部占位高度
|
|
135
136
|
ViewGroup.LayoutParams topParams = topSpacer.getLayoutParams();
|
|
136
|
-
topParams.height =
|
|
137
|
+
topParams.height = systemBars.top;
|
|
137
138
|
topSpacer.setLayoutParams(topParams);
|
|
138
139
|
|
|
139
|
-
//
|
|
140
|
+
// 更新底部占位高度(考虑键盘)
|
|
140
141
|
ViewGroup.LayoutParams bottomParams = bottomSpacer.getLayoutParams();
|
|
141
|
-
bottomParams.height =
|
|
142
|
+
bottomParams.height = Math.max(systemBars.bottom, ime.bottom);
|
|
142
143
|
bottomSpacer.setLayoutParams(bottomParams);
|
|
143
144
|
|
|
144
145
|
return WindowInsetsCompat.CONSUMED;
|