Disable soft keyboard on NumberPicker

前端 未结 11 1119
庸人自扰
庸人自扰 2020-12-22 18:20

I\'m trying to deactivate the soft keyboard when using a NumberPicker to enter numerical values (for aesthetic reasons). This is my layout-xml-code:



        
11条回答
  •  萌比男神i
    2020-12-22 18:48

    If you only want to hide the software keyboard when loading the view with your number picker, but still want the users to be able to edit after the view loads, then you shouldn't block descendant focusability. Instead, just prevent the number picker from being the first focused item in your view.

    See this answer for details.

    Based on the above answer:

        
        
    
        
        
    

提交回复
热议问题