fix(输入法): 消除RTOS和Android文字键盘间距

这个提交包含在:
sydxky 于 2026-11-14 17:38:11 +08:00 提交
1 父节点 87aa966a51
当前提交 bce6f8083b
27 个文件已更改
+406 -253

没有与搜索条件相匹配的文件

@@ -110,7 +110,9 @@ final class KeyboardSurface extends ViewGroup {
if(count>0)action("⌄","expand",410-left-35,candidateY,33,32,24,false);
else place(label(state.busy?"正在查词…":state.message,12,MUTED),left,candidateY,available,32);
}
float keyY=candidateY+38;
// A direct-entry mode has no candidate strip; attach its keys to the
// composition caption instead of reserving an invisible suggestion row.
float keyY=isChinese()?candidateY+38:compositionY+25;
String[][] captions,values;
switch(state.mode) {
case "t9":captions=new String[][]{{"标点","ABC","DEF"},{"GHI","JKL","MNO"},{"PQRS","TUV","WXYZ"}};values=new String[][]{{"mode:sym","key:2","key:3"},{"key:4","key:5","key:6"},{"key:7","key:8","key:9"}};break;
@@ -121,7 +123,7 @@ final class KeyboardSurface extends ViewGroup {
}
float keyHeight=captions.length==4?36:49;
// Hide an unused suggestion strip in direct entry modes to enlarge the keys.
if(!isChinese()){keyY-=27;keyHeight=captions.length==4?43:58;}
if(!isChinese()){keyHeight=captions.length==4?43:58;}
for(int i=0;i<captions.length;i++)row(captions[i],values[i],keyY+i*(keyHeight+4),keyHeight,captions[i].length>=7?21:24);
float modeY=keyY+captions.length*(keyHeight+4)+3;
row(new String[]{"九宫","26键","14键",state.upper?"ABC":"abc","123","符号"},new String[]{"mode:t9","mode:py","mode:14","mode:en","mode:num","mode:sym"},modeY,27,13);