5

I customized the soft keyboard. But keyboard keys(1,2,3,4,5,6,7,8,9,0,. and OK) is looking blurry.Delete key is fine but other key is looking blurry.

Here is my keyboard. enter image description here

Here is my custom keyboard xml file

<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:horizontalGap="0px"
android:keyHeight="10%p"
android:keyWidth="24%p"
android:verticalGap="0px" >

<Row>
    <Key
        android:codes="49"
        android:keyEdgeFlags="left"
        android:keyLabel="1" />
    <Key
        android:codes="50"
        android:keyLabel="2" />
    <Key
        android:codes="51"
        android:keyLabel="3" />
    <Key
        android:codes="-3"
        android:keyEdgeFlags="right"
        android:keyLabel="OK"
        android:keyWidth="28%p" />
</Row>
<Row>
    <Key
        android:codes="52"
        android:keyEdgeFlags="left"
        android:keyLabel="4" />
    <Key
        android:codes="53"
        android:keyLabel="5" />
    <Key
        android:codes="54"
        android:keyLabel="6" />
    <Key
        android:codes="-5"
        android:isRepeatable="true"
        android:keyEdgeFlags="right"
        android:keyIcon="@drawable/sym_keyboard_delete"
        android:keyWidth="28%p" />
</Row>
<Row>
    <Key
        android:codes="55"
        android:keyEdgeFlags="left"
        android:keyLabel="7" />
    <Key
        android:codes="56"
        android:keyLabel="8" />
    <Key
        android:codes="57"
        android:keyLabel="9" />
    <Key
        android:codes="48"
        android:keyLabel="0"
        android:keyWidth="14%p" />
    <Key
        android:codes="46"
        android:keyEdgeFlags="right"
        android:keyLabel="."
        android:keyWidth="14%p" />
</Row>

rene
  • 41,474
  • 78
  • 114
  • 152
Mubarak
  • 1,419
  • 15
  • 22

2 Answers2

27

Though it is very late answer, it will help others.

use either android:shadowRadius or android:shadowColor attribute in your KeyboardView tag.

ex:

<android.inputmethodservice.KeyboardView
    android:id="@+id/keyboardview"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:shadowColor="@android:color/transparent"
    android:focusableInTouchMode="true" 
    android:visibility="gone" />

or

<android.inputmethodservice.KeyboardView
        android:id="@+id/keyboardview"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:shadowRadius="0.0"
        android:focusableInTouchMode="true" 
        android:visibility="gone" />
Jayabal
  • 3,619
  • 3
  • 24
  • 32
1

Your keys are bigger than normal keyboard keys. Because of this these number keys upscaling and shows blurry i guess. You will use custom drawable images.

AdemC
  • 125
  • 3
  • 6
  • Thank u for ur comments but Plz check the '0' and dot keys in the uploaded image that is small but still that key looks like blurry.and i tried with small keys means i changed the width and height of keys but still problem not solve. – Mubarak Jan 28 '14 at 10:53