I am working to make a custom keyboard with android KeyboardView
[android.inputmethodservice.KeyboardView]. Everything works fine except when I am trying to reduce the width of the key.
The Problem is: Here I can't make the bottom row gravity to center
The Code Behind this is:
<?xml version="1.0" encoding="utf-8"?>
<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
android:keyWidth="10%p"
android:horizontalGap="0px"
android:verticalGap="0px"
android:keyHeight="60dp">
<Row android:rowEdgeFlags="bottom">
<Key android:keyLabel="," android:keyWidth="5%p" android:codes="44"/>
<Key android:keyLabel="/" android:keyWidth="5%p" android:codes="47"/>
<Key android:keyLabel="SPACE" android:keyWidth="40%p" android:isRepeatable="true" android:codes="32"/>
<Key android:keyLabel="DEL" android:keyWidth="10%p" android:isRepeatable="true" android:codes="-5"/>
<Key android:keyLabel="DONE" android:keyWidth="10%p" android:codes="-4"/>
</Row>
</Keyboard>
So, Is there Any way to make this row gravity to center?
question from:
https://stackoverflow.com/questions/66045213/how-to-set-gravity-of-row-in-keyboardview-in-android 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…