1

I have tried to use the custom keyboard in android. I tried the following links Custom keyboard - Android

I have also tried to create a custom keyboard using Android Custom keyboard link.

All these have a custom keyboard, but it uses the default key pattern of android.

I would like to create a keypad without such look and feel.

I want to create a keyboard with a key having occupied two rows in a column whereas some can occupy a space of 4 keys(2x2).

Example : https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRtHoD_LfzD4AepsAffO2WQbMYzWlQdymMWAXqz47s8EwvryYNW

Look at the enter key in this keyboard.

Also, I want to use drawable images that can be used as the key, which can have wierd design. I would want to create the image shape depending on the png image.

Community
  • 1
  • 1
Mohit Ajwani
  • 1,328
  • 12
  • 24

2 Answers2

1

I used the ImageButton and specified a source file for the drawable image.

This helped me with the image on the button, but the button still occupied a rectangle section. To remove the alpha region, I seeked help of the android:background property of ImageButton in android layout file.

    android:background="@android:color/transparent"
    android:src="@drawable/your_image"

Now, if you want to disallow button taps on those regions, you can refer the following link. Hexagon button with hexagon touch area

Community
  • 1
  • 1
Mohit Ajwani
  • 1,328
  • 12
  • 24
0

You can try create custom layout and use it when you want to show soft keyboard. Here's a link explaining how you can detect show/hide keyboard action: https://stackoverflow.com/a/24388539/3864698

Community
  • 1
  • 1
QArea
  • 4,955
  • 1
  • 12
  • 22