APP比较多页面时,业务需要从页面A跳转到页面B。
首先定义一个页面receive,另一个页面index,点击index上的按钮,跳转到receive页面。
receive.kv定义如下:
<ReceivePage>: BoxLayout: id:receive_box orientation:"vertical" canvas.before: Rectangle: pos:self.pos size:self.size source:"image/l115.jpg" Label: id:receive_tip text:"receive is ready" color:1,0,0,1 Label: id:status color:0,0,0,1 Label: id:receive_info color:0,0,0,1 Button: text:"receive" size_hint:.2,.15 pos_hint:{'center_x':0.5,'y':0.1} background_color:1,0.305,0,1
定义reveive.py加载receive.kv
<