开发者

SoftKeyboard Sample blurry font / key background problem

I am new to android development, so sorry for maybe a stupid question.

I am going to write simple soft keyboard. I started with the following sample: http://developer.android.com/resources/samples/SoftKeyboard/index.html

When I compiled and launched it on emulator (WVGA800, 24开发者_开发百科0 dpi, Android 2.2) I noticed that key shapes and font is blurry. When I opened stock android soft keyboard keys are perfect as well as their font. I tried to install this keyboard (from the sample) to my htc desire hd and quality of keys / fonts was bad as on the emulator.

How can I achieve the same quality as stock keyboard has.


This question is rather old, but I just now bumped into the same issue, solved it and could not find a solution.

The issue is that this keyboard, by default, is set for as a small keyboard with a low density. Review this reference for more information:

http://developer.android.com/guide/topics/manifest/supports-screens-element.html

Here are my settings that solved the issue located in the AndroidManifest.xml file:

<supports-screens android:resizeable="false"
         android:smallScreens="false"
         android:normalScreens="false"
         android:largeScreens="true"
         android:xlargeScreens="true"
         android:anyDensity="true"
         android:requiresSmallestWidthDp="600"
         android:compatibleWidthLimitDp="600"
         android:largestWidthLimitDp="600"/>


well i found the answer.

well in the keyboard view xml put android:shadowRadius="0.0"

<android.inputmethodservice.KeyboardView 
...
android:shadowRadius="0.0" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜