我目前正在创建一个使用kivy框架和kivy garden包的Android应用程序。我想在其中添加另一个屏幕,但我不能。谢谢
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.properties import ListProperty,ObjectProperty,NumericProperty
from kivy.uix.gridlayout import GridLayout
from kivy.uix.behaviors import ButtonBehavior
from kivy.metrics import dp
from material.flatui.flatui import FloatingAction,RaisedButton,_MaterialButton
from garden import *
from sqlalchemy import *
from kivy.core.text import LabelBase
from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
class MyTab(GridLayout, AndroidTabsBase):
pass
class MyTabb(FloatLayout,AndroidTabsBase):
thoughts = ObjectProperty()
class MyTabbb(FloatLayout,AndroidTabsBase):
pass
class MyScreenManager(ScreenManager,Screen):
pass
class ShoppingScreen(Screen):
pass
class ExampleApp(App):
thoughts = ObjectProperty()
def build(self):
android_tabs = AndroidTabs()
return android_tabs
if __name__=='__main__':
from kivy.core.window import Window
from kivy.utils import get_color_from_hex
LabelBase.register(name='Modern Pictograms',
fn_regular='modernpics.ttf')
LabelBase.register(name='Heydings',
fn_regular='heydings.ttf')
LabelBase.register(name='Roboto',
fn_regular='Roboto-Thin.ttf')
Window.clearcolor = get_color_from_hex('#008CD4')
ExampleApp().run()
和kv lang中的代码
<FBut@Button>:
font_size: 100
font_name: 'modernpics'
<AndroidTabs>:
tab_indicator_height: '2dp'
anim_threshold: 0
MyTab:
orientation: 'horizontal'
cols: 2
spacing: 5
text: 'BUDGET'
FBut:
text: 'i'
所以我想添加另一个屏幕以便我查看其他小部件