0

I have a custom keyboard in my xamarin forms project that looks like this:enter image description here

A problem I'm experiencing is with the enter key on the right. When I press on the upper half of the key it works, but when I press on the lower half of the key it doesn't work.

Is there a means by which I can effectively get that button to span two of the rows and be fully functional?

This is the xml code that I use to generate this keyboard:

<Keyboard xmlns:android="http://schemas.android.com/apk/res/android"
    android:keyWidth="8%p"
    android:keyHeight="8%p"
    android:horizontalGap="1%p"
    android:verticalGap="1%p">

    <Row android:keyHeight="1%p">
    </Row>
    <Row>
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="left" />
        <Key android:codes="14" android:keyLabel="7" android:keyWidth="22.75%p" />
        <Key android:codes="15" android:keyLabel="8" android:keyWidth="22.75%p" />
        <Key android:codes="16" android:keyLabel="9" android:keyWidth="22.75%p" />
        <Key android:codes="67" android:keyIcon="@drawable/delete" android:keyWidth="22.75%p" />
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="right"  />
    </Row>

    <Row>
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="left" />
        <Key android:codes="11" android:keyLabel="4" android:keyWidth="22.75%p" />
        <Key android:codes="12" android:keyLabel="5" android:keyWidth="22.75%p" />
        <Key android:codes="13" android:keyLabel="6" android:keyWidth="22.75%p" />
        <Key android:codes="66" android:keyIcon="@drawable/enter" android:keyWidth="22.75%p" android:keyHeight="17%p"/>
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="right"  />
    </Row>
    
    <Row>
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="left" />
        <Key android:codes="8" android:keyLabel="1" android:keyWidth="22.75%p" />
        <Key android:codes="9" android:keyLabel="2" android:keyWidth="22.75%p" />
        <Key android:codes="10" android:keyLabel="3" android:keyWidth="22.75%p" />
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="right"  />
    </Row>
    
    <Row>
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="left" />
        <Key android:codes="7" android:keyLabel="0" android:keyWidth="46.5%p" />
        <Key android:codes="0" android:keyWidth="0dp" android:horizontalGap="2%p" android:keyEdgeFlags="right"  />
    </Row>
    <Row android:keyHeight="2%p">
    </Row>
</Keyboard>
Renma
  • 81
  • 1
  • 11
  • You can refer to this case: [How can you make a custom keyboard in Android?](https://stackoverflow.com/questions/9577304/how-can-you-make-a-custom-keyboard-in-android). Coincidentally, they are all on the same line, not occupying two lines. – Jianwei Sun - MSFT Mar 31 '23 at 06:06

0 Answers0