custom keyboard iOS

WatamanWataman Member ✭✭
edited March 13 in Xamarin.Forms

To realize a custom keyboard i tried this example from github:

CustomKeyboardDemo (sorry, it's not allowed for me to add link).

It worked fine if the custom renderer inheritate from PageRenderer.
But i have to work with ViewRenderer.
In my iOS project I created a renderer which inharitate from a ViewRenderer and used LayoutSubviews() instead of DidLayoutLoad().
Now the view works fine, but the keyboard doesn't appear as before, when the PageRederer was used.

What's going wrong there ?

Answers

  • JohnHardmanJohnHardman GBUniversity mod

    @Wataman

    You have not said what you want your custom keyboard to do.

    Have you investigated using the Keyboard property, and looked at https://docs.microsoft.com/en-us/dotnet/api/xamarin.forms.keyboard.create?view=xamarin-forms , to see if you can create the keyboard that you need without the use of custom renderers?

  • WatamanWataman Member ✭✭
    edited March 13

    @JohnHardman

    thanks for reply,
    i want to show a completly different keyboard with text templates.

  • JohnHardmanJohnHardman GBUniversity mod

    @Wataman said:
    i want to show a completly different keyboard with text templates.

    I don't know what that means. Can you explain further, or show images of what you want to achieve?

  • ColeXColeX Member, Xamarin Team Xamurai
    edited March 14

    Is this sample you followed?

    Now the view works fine, but the keyboard doesn't appear as before, when the PageRederer was used.

    We can't get the meaning of appear as before . Please show more details about what you want to achieve.

  • WatamanWataman Member ✭✭
    edited March 15

    @ColeX

    Yes, it is.
    Thank you for share.

    The aim is to show a custom Keyboard on entry.
    In the sample you can see a keyboard which is optimized for hex input (for example).

  • WatamanWataman Member ✭✭
    edited March 15

    @JohnHardman

    If you tap on Entry, the Keyboard comes up.
    Imagine that you dont want to use the default keyboard but a custom keyboard with emojis or sth. else.

  • JohnHardmanJohnHardman GBUniversity mod

    It is still unclear what your requirement is

    @Wataman said:
    Imagine that you dont want to use the default keyboard but a custom keyboard with emojis

    The user can enter emojis from the standard keyboard that pops up on iOS.

    @Wataman said:
    or sth. else.

    What something else?

    @Wataman said:
    i want to show a completly different keyboard with text templates.

    What do you mean by text templates?

  • WatamanWataman Member ✭✭
    edited March 15

    @JohnHardman

    okay, imagine you dont need a keyboard with normal letters like a,b,c
    but a keyboard with some random letters or textsnippets.

    For example a keyboard with the buttons : 1,2,3,4,5,6,7,when,ok,yes,no,?,!,ß,°

Sign In or Register to comment.