示例#1
0
 def keyboard_frame_will_change(self, f):
     r = ui.convert_rect(f, to_view=self)
     if r[3] > 0:
         kbh = self.height - r[1]
     else:
         kbh = 0
     if self.delegate:
         self.delegate.update_kb_height(kbh)
示例#2
0
	def keyboard_frame_will_change(self, f):
		r = ui.convert_rect(f, to_view=self)
		if r[3] > 0:
			kbh = self.height - r[1]
		else:
			kbh = 0
		if self.delegate:
			self.delegate.update_kb_height(kbh)
示例#3
0
    def keyboard_frame_did_change(self,frame):
        if not self.on_screen:
            return

        if self.superview:
            if frame[1]:
                kbframe=ui.convert_rect(frame,None,self)
                self.height=kbframe[1]

                self['keyboard'].hidden=False

            else:
                self.height=self.superview.height
                self['keyboard'].hidden=True
    def keyboard_frame_did_change(self, frame):
        if not self.on_screen:
            return

        if self.superview:
            if frame[1]:
                kbframe = ui.convert_rect(frame, None, self)
                self.height = kbframe[1]

                self['keyboard'].hidden = False

            else:
                self.height = self.superview.height
                self['keyboard'].hidden = True