Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用画布根据使用按键事件的用户输入在移动屏幕中绘制字符串。在这里,我的用户想要输入像 abc 这样的字母数字字符。例如,用户尝试输入“d”,然后它将显示 3 而不是“d”。那么,我是否可以同时获得字符串和数字并能够在手机屏幕上绘制?
不,如果您在 Canvas 中执行此操作,则需要实现自己的输入。我想每个数字都有一个二维字符数组。 [['a', 'b', 'c'], ['d', 'e', 'f']...
[['a', 'b', 'c'], ['d', 'e', 'f']...
您还需要实现超时,然后继续下一个字符。
更不用说检测用户是否有 QWERTY 键盘(诺基亚 E71 等)。
基本上,你必须自己实现它;这没有捷径可走。