You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

KivyMD应用切换屏幕时部件残留阴影问题求助

KivyMD屏幕切换后部件阴影残留问题求助

我是编程和本平台的新手,此前发帖信息不全,在此致歉。使用KivyMD开发应用布局时遇到异常:切换屏幕后,部分部件的阴影会固定在背景无法消除。我已尝试移除部件的elevation等阴影相关属性,但问题仍未解决。问题表现为:屏幕切换完成后,背景区域会残留之前页面部件的阴影痕迹。

相关代码片段:

GridLayout:
    cols:1
    MDLabel:
        size_hint: (1,.1)
        text: "Table Title\nSESSION TYPE SUMMARY"

MDBoxLayout:
    orientation: "vertical"
    size_hint:1,.4
    spacing: 5
    FloatLayout:
        id:table
        anchor_left:True
        bar_width: 2
    BoxLayout:
        elevation: 0
        orientation:"horizontal"
        size_hint:(1, .5)
        spacing:10
        MDRaisedButton:
            elevation: 0
            id: tab_period
            pos_hint: {"center_y": .1}
            size_hint: (.5, .3)
            text:"suca"
            on_release: root.table_menu_period()
        MDRaisedButton:
            elevation: 0
            background_normal: ''
            id:sess_type
            pos_hint: {"center_y": .1}
            size_hint: (.5, .3)
            text:"suca2"
            on_release: root.table_menu_session()
BoxLayout:
    orientation: "vertical"
    # size_hint_y: .5
    # pos_hint: {"center_x": .5, "center_y": .7}

希望有经验的开发者能给出解决建议。

内容的提问来源于stack exchange,提问作者Giulio Randazzo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 21:38:12