Maui android on screen keyboard issue

asked 2023-01-24T07:23:50.46+00:00
Haviv Elbsz 481 Reputation points

Hello all. How I can modify the on screen keyboard for my application. I want that the on screen keyboard when my app run to contain only the alphanumeric and a few non alphanumeric characters. How I can do that and when exit my app to return to the default on screen keyboard. Thank you very much

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
871 questions
{count} votes

Accepted answer
  1. answered 2023-01-25T05:56:22.9766667+00:00
    Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,321 Reputation points Microsoft Employee

    Hello,

    How I can do that and when exit my app to return to the default on screen keyboard.

    The popup soft keyboard comes from the Android OS, we cannot change android system level's soft keyboard.

    However, if you use <Entry> to input characters in your application, we can change input type for all of your Entry by Resources\Styles\Styles.xaml, you can find <Style TargetType="Entry"> in Resources\Styles\Styles.xaml, then add following xml.

       <Setter Property="Keyboard" Value="Numeric" />
    

    Or set <Entry Keyboard="Numeric"></Entry> for all of Entrys in your application.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful