python - Kivy/KivyMD 屏幕在 Android 上加载需要 10 秒,在 Windows 上加载需要 3 秒
问题描述
我们正在开发一个有很多屏幕和很多 kv 代码的应用程序,使用Kulothungan 在 GitHub 上的延迟加载模板,它很好,除了一个屏幕,计算器。在 Android 上加载需要 10 秒或更长时间,我们不明白为什么!
部分代码:
# ----- Python Class: -----
class CustomRoundButton(ButtonBehavior, CircularRippleBehavior, CircularElevationBehavior, MDFloatLayout):
pass
# ----- KV Class: -----
<Calculator>
name: "calculator"
MDBoxLayout:
padding: "35dp"
spacing: "25dp"
orientation: "vertical"
MDLabel:
id: calclabel
text: "0"
halign: "right"
valign: "center"
font_style: "H2"
size_hint_y: .4
pos_hint_y: .5
GridLayout:
cols: 4
spacing: "15dp"
CustomRoundButton:
pos_hint: {"center_x": .5, "center_y": .5}
radius: lbl.texture_size[0] + self.height / 2
md_bg_color: app.theme_cls.accent_color
size_hint_y: None
height: self.width
elevation: 8
on_release:
root.calcformula = ""
calclabel.text = "0"
Label:
id: lbl
text: "AC"
font_size: root.height / 20
-text_size: None, None
size_hint: None, None
size: self.texture_size[0] + dp(50), self.texture_size[0] + dp(50)
pos_hint: {"center_x": .5, "center_y": .5}
color: 1, 1, 1, 1
...
任何帮助将非常感激!谢谢!
解决方案
推荐阅读
- arrays - 我想在 for 循环中打印这个字符串的所有输入,但它只打印最后一个输入
- json - jq 从 json 重复项创建唯一键
- php - 为什么添加令牌后会出现 419 页面?
- spring - spring-cloud-stream-binder-kafka 功能绑定的消息处理保证
- amazon-web-services - AWS Step Functions - 将数据批量发送到子/嵌套 Step Function 状态机
- r - R堆叠条中的highchart,带有2个标签
- spring-boot - 外部化 Quartz 调度器 Springboot 的 quartz.properties
- regex - PowerShell正则表达式提取时间戳
- javascript - 通过第三方应用程序/RedApp添加备注后如何刷新saber购买窗口
- python - 如何使用 jenkins 检查上传到 github 的文件