我正试图在Kivy地图视图中添加一些小部件
mapview = self.mapWidget(self.lat, self.lon)
touchBarbtn1 = Button(text='Unlock')
touchBarbtn1.bind(on_press=lambda x: self.centerOnUser())
mapview.add_widget(touchBarbtn1)
但不管我给它什么布局选项,它总是卡在左下角。即使我添加了更多的小部件,它们也只是堆叠在左下角的顶部。我的目标是在右上角创建一个按钮,使地图位于用户的中心。在
示例
在主.py在
输出
相关问题 更多 >
编程相关推荐