kivy textinput弹出输入框处理
2017-06-05 13:20
197 查看
在kivy打包Android程序后运行,点击输入框会自动弹出输入法将自己的控件遮挡住,在群友(校长巨佬)的指导下找到了softinput_mod 参数,可以控制输入法的弹窗模式。
softinput_mode 官网参数介绍:
This specifies the behavior of window contents on display of the soft keyboard on mobile platforms. It can be one of ”, ‘pan’, ‘scale’, ‘resize’ or ‘below_target’. Their effects are listed below.
”. The main window is left as is, allowing you to use the keyboard_height to manage the window contents manually.
‘pan’. The main window pans, moving the bottom part of the window to be always on top of the keyboard.
‘resize’. The window is resized and the contents scaled to fit the remaining space.
‘below_target’. The window pans so that the current target TextInput widget requesting the keyboard is presented just above the soft keyboard.
‘scale’参数在官网未找到相关说明
‘below_target’需要kivy1.9.1版本或以上
例如:
softinput_mode默认为‘’
个人博客地址:https://zyqzyq.github.io/
softinput_mode 官网参数介绍:
This specifies the behavior of window contents on display of the soft keyboard on mobile platforms. It can be one of ”, ‘pan’, ‘scale’, ‘resize’ or ‘below_target’. Their effects are listed below.
”. The main window is left as is, allowing you to use the keyboard_height to manage the window contents manually.
‘pan’. The main window pans, moving the bottom part of the window to be always on top of the keyboard.
‘resize’. The window is resized and the contents scaled to fit the remaining space.
‘below_target’. The window pans so that the current target TextInput widget requesting the keyboard is presented just above the soft keyboard.
‘scale’参数在官网未找到相关说明
‘below_target’需要kivy1.9.1版本或以上
例如:
`from kivy.core.window import WindowBase WindowBase.softinput_mode='below_target'`
softinput_mode默认为‘’
个人博客地址:https://zyqzyq.github.io/
相关文章推荐
- react native TextInput无法弹出输入框问题
- React Native 处理TextInput在输入后,点击布局空白处软件盘能弹出和收回。
- 改变TextInput输入框得到焦点时边框的颜色
- UITextField控件处理键盘弹出时遮住输入框的问题。
- Flex有提示功能的TextInput输入框
- webview的input输入框获取焦点弹出数字键盘
- js判断input输入框为空时遇到的问题 弹窗后,光标没有定位到输入框,而是直接执行我的处理页面程序
- input输入框js处理汇总【转载】
- Hadoop源码解析之: TextInputFormat如何处理跨split的行
- Hadoop源码解析之: TextInputFormat如何处理跨split的行
- Hadoop源码解析之: TextInputFormat如何处理跨split的行
- EditText自动弹出键盘问题处理
- UITextField控件处理键盘弹出时遮住输入框的问题。
- input输入框js处理汇总
- js判断input输入框为空时遇到的问题 弹窗后,光标没有定位到输入框,而是直接执行我的处理页面程序
- 处理Flex中TextInput,TextArea的文本超链接
- UITextField控件处理键盘弹出时遮住输入框的问题(Andy)
- input文本输入框的文字居中处理
- 实现Flash的TextInput输入框自动填写功能
- js判断input输入框为空时遇到的问题 弹窗后,光标没有定位到输入框,而是直接执行我的处理页面程序