当前位置: 首页>>代码示例>>Python>>正文


Python Window.softinput_mode方法代码示例

本文整理汇总了Python中kivy.core.window.Window.softinput_mode方法的典型用法代码示例。如果您正苦于以下问题:Python Window.softinput_mode方法的具体用法?Python Window.softinput_mode怎么用?Python Window.softinput_mode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.core.window.Window的用法示例。


在下文中一共展示了Window.softinput_mode方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: show_input_popup

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import softinput_mode [as 别名]
def show_input_popup(self, prompt):
        # Window.softinput_mode = 'below_target'
        p = InputPopup(prompt=prompt,
                       submit_func=self.send_input)
        p.open() 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:7,代码来源:interpreter.py

示例2: submit_text

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import softinput_mode [as 别名]
def submit_text(self, text):
        self.submit_func(text)
        # Window.softinput_mode = 'pan'
        self.dismiss()

    # This is the normal ModalView on_touch_down, with
    # self.submit_func added to ensure that some text is submitted. 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:9,代码来源:interpreter.py

示例3: build

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import softinput_mode [as 别名]
def build(self):
        self.settings_retrieved = False  # used to prevent setting
                                         # updates until they have
                                         # been fetched from the file

        Window.clearcolor = (1, 1, 1, 1)
        Window.softinput_mode = 'pan'

        self.parse_args()
        Clock.schedule_once(self.android_setup, 0)
        Clock.schedule_once(self.retrieve_settings, 0)

        if platform == 'android':
            settings_path = '../settings.json'
        else:
            settings_path = join(abspath(dirname(__file__)), '..', 'settings.json')
        self.store = SettingsStore(settings_path)

        # Retrieve the input throttling argument so that it can be
        # passed to the service immediately
        self.setting__throttle_output = self.store.get(
            'setting__throttle_output',
            {'value': self.setting__throttle_output_default})['value']

        Window.bind(on_keyboard=self.key_input)

        for attr in dir(self):
            if attr.startswith('setting__') and not attr.endswith('_default'):
                self.bind(**{attr: partial(self.setting_updated, attr)})

        self.manager = Manager()

        return self.manager 
开发者ID:inclement,项目名称:Pyonic-interpreter,代码行数:35,代码来源:main.py

示例4: __init__

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import softinput_mode [as 别名]
def __init__(self, **kwargs):
        super(RaceCaptureApp, self).__init__(**kwargs)

        if kivy.platform in ['ios', 'macosx', 'linux']:
            kivy.resources.resource_add_path(os.path.join(os.path.dirname(os.path.realpath(__file__)), "data"))

        # We do this because when this app is bundled into a standalone app
        # by pyinstaller we must reference all files by their absolute paths
        # sys._MEIPASS is provided by pyinstaller
        if getattr(sys, 'frozen', False):
            self.base_dir = sys._MEIPASS
        else:
            self.base_dir = os.path.dirname(os.path.abspath(__file__))

        self.settings = SystemSettings(self.user_data_dir, base_dir=self.base_dir)
        self.settings.userPrefs.bind(on_pref_change=self._on_preference_change)

        self.track_manager = TrackManager(user_dir=self.settings.get_default_data_dir(), base_dir=self.base_dir)
        self.preset_manager = PresetManager(user_dir=self.settings.get_default_data_dir(), base_dir=self.base_dir)

        # RaceCapture communications API
        self._rc_api = RcpApi(on_disconnect=self._on_rcp_disconnect, settings=self.settings)

        self._databus = DataBusFactory().create_standard_databus(self.settings.systemChannels)
        self.settings.runtimeChannels.data_bus = self._databus
        self._datastore = CachingAnalysisDatastore(databus=self._databus)
        self._session_recorder = SessionRecorder(self._datastore, self._databus, self._rc_api, self.settings, self.track_manager, self._status_pump)
        self._session_recorder.bind(on_recording=self._on_session_recording)


        HelpInfo.settings = self.settings

        # Ensure soft input mode text inputs aren't obstructed
        Window.softinput_mode = 'below_target'

        # Capture keyboard events for handling escape / back
        Window.bind(on_keyboard=self._on_keyboard)

        self.register_event_type('on_tracks_updated')
        self.processArgs()
        self.settings.appConfig.setUserDir(self.user_data_dir)
        self.setup_telemetry() 
开发者ID:autosportlabs,项目名称:RaceCapture_App,代码行数:44,代码来源:main.py


注:本文中的kivy.core.window.Window.softinput_mode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。