小编Zol*_*abo的帖子

如何在键盘 xml 中映射重音字符

我必须在我的应用程序中实现一个简单的自定义软键盘,并且我也想在键盘上显示重音字符。

\n\n

它们是:\n\xc3\xad、\xc3\xa9、\xc3\xa1、\xc5\xb1、\xc3\xba、\xc5\x91、\xc3\xb3、\xc3\xbc、\xc3\xb6

\n\n

我的问题是如何在键盘 xml 中映射这些?这些的关键代码是什么?我在官方KeyEvent文档中找不到它们。

\n\n

我当前的键盘定义 xml 如下所示:

\n\n\n\n
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"\n    android:keyWidth="10%p"\n    android:horizontalGap="0px"\n    android:verticalGap="0px"\n    >\n\n<Row android:keyHeight="16%">\n    <Key android:codes="45" android:keyLabel="q" android:keyEdgeFlags="left"/>\n    <Key android:codes="51" android:keyLabel="w"/>\n    <Key android:codes="33" android:keyLabel="e"/>\n    <Key android:codes="46" android:keyLabel="r"/>\n    <Key android:codes="48" android:keyLabel="t"/>\n    <Key android:codes="54" android:keyLabel="z"/>\n    <Key android:codes="49" android:keyLabel="u"/>\n    <Key android:codes="37" android:keyLabel="i"/>\n    <Key android:codes="43" android:keyLabel="o"/>\n    <Key android:codes="44" android:keyLabel="p" android:keyEdgeFlags="right"/>\n</Row>\n\n<Row android:keyHeight="16%">\n    <Key android:codes="?" android:keyLabel="\xc3\xb6" android:keyEdgeFlags="left"/>\n    <Key android:codes="?" android:keyLabel="\xc5\x91"/>\n    <Key android:codes="?" android:keyLabel="\xc3\xbc"/>\n    <Key android:codes="?" android:keyLabel="\xc5\xb1"/>\n    <Key android:codes="?" android:keyLabel="\xc3\xb3"/>\n    <Key android:codes="?" android:keyLabel="\xc3\xa9"/>\n    <Key android:codes="?" android:keyLabel="\xc3\xa1"/>\n    <Key android:codes="?" android:keyLabel="\xc3\xad" android:keyEdgeFlags="right"/>\n</Row>\n</Keyboard>\n …
Run Code Online (Sandbox Code Playgroud)

android android-softkeyboard android-xml

3
推荐指数
1
解决办法
1841
查看次数

Too many connections with Spring + MyBatis + MySQL + JDBC

I am trying to work with spring, mybatis and mysql with jdbc. The only small problem I have after some queries, it throws an exception. The DB says: Too many connections.

So what I am trying to do to prevent the too many connection issue is to set up a connection pool. I have tried dbcp and bonecp also but both have the same behaviour. When I reload my page it just keeps loading in the browser and after some …

java spring connection-pooling jdbc mybatis

1
推荐指数
1
解决办法
2万
查看次数