Android Custom Keyboard Layout as a Vector Asset - android

I am attempting to create a custom keyboard where a vector image is the keyboard itself. Rather than having a custom xml file in the directory res/xml and defining a Keyboard tag, I want to have solely the image as the keyboard. I wanted to know if this is even possible to do because all of the examples I have seen thus far regarding how to create a custom keyboard is just defining an xml file for the layout of the keys and placing it inside of a KeyboardView. Any help would be appreciated!

No, it's not possible. To create a cusotm keyboard you need KeyboardView and Keyboard classes.
Also, I don't understand why would you need it. Do you want a background/theme for your keyboard? If yes, you can do it like this : mKeyboardView.setBackground(drawable/color) Also, there are other ways to set theme(including key border/background/color etc) for a keyboard, but since you are only concern to learn if it's possible to create a custom keyboard via vector asset. So, the answer is no.

Related

Is it possible to set a custom layout for a key in keyboard?

I need to create a custom keyboard for android with specific design and behavior of keys on it (design: https://i.stack.imgur.com/Bkv8k.jpg). I think this is possible only with creating a custom interface of keys but I didnt found any paths to set custom views for them.
Can I set (and how I can do it if it possible) custom layout for keys on my keyboard?
The problem has solved. Answer is simple - just make your own Keyboard and KeyboardView classes in project then rewrite onDraw method in KeyboardView. After this, you can change default keyboards classes to yours in your keyboard service.

Android Keyboard layout based on user preference

I am developing an Android Keyboard using Softkey keyboard example in native language.
Now, I want user to be able to set keyborder,have a option of setting background colors,size and similar customization available and correspondingly appropriate keyboard should be generated.
Can anyone please guide me the right direction.
color setting
You need define your custom color scheme in your code. I store it in XML file.
<theme>
<!--define color-->
<color-def name="key_white" value="#F9F9FA"/>
<!--<color-def name="light_gray" value="#D4D6D7"/>-->
<color-def name="white" value="#FFFFFF"/>
<color-def name="shadow_black" value="#828386"/>
<color-def name="text_black" value="#000000"/>
<color-def name="light_gray" value="#BAC2C7"/>
<color-def name="cute_blue" value="#194FDC"/>
...
Then, parse this xml file, and apply these color values to onDraw() method.
size setting
Do it in the similar way, when drawing keyboard, using parameters which defined by user to determine size information.
I have made contribution to an input method software. The key of developing custom keyboard is designing the structure properly.

Android change look of custom keyboard

I have successfully made a very basic custom keyboard for Android based off of this tutorial. The problem is, this keyboard looks very odd and outdated for Android lollipop:
Image of the current keyboard:
I have been looking at other keyboards such as the default OS keyboard and this one:
And they look much better for Android.
How can I modify the color scheme and style of my keyboard to look better?
It is also worth noting I am making a keyboard that is very similar to the second example (it will just have a few extra buttons).
If you want a lot of control and be able to do things dynamically, I suggest you ditch the xml layout and KeyboardView class and make your own custom keyboard view

Android: How to change text size of KeyboardView?

I have made a Custom keyboard to my application, and I would like to change the key's text size.
Is there any way to archive this? May be using themes or any other way?
Never mind. I've found the KeyboardView property: android:keyTextSize

Is creating a non-rectangular keyboard possible?

I want to create a custom Android keyboard that is in a arc like shape, but I don't know if it is at all possible or how to do it. So I'd appreciate being pointed in the right direction
Yes, its possible to create a non-rectangular keyboard. Check the android softkeyboard implementation and change the layouts to what you want. AFAIK, its using a custom view which handles the buttons addition/removal, you need to change this to achieve this.

Categories

Resources