Closed AHiXilTOr closed 5 months ago
@AHiXilTOr Please elaborate, code you attached is working as intended.
@AHiXilTOr Please elaborate, code you attached is working as intended.
@AHiXilTOr Are you on master branch? This does not happens with me.
@T-Dynamos Yes
@AHiXilTOr Please see if issue is resolved:
https://github.com/kivymd/KivyMD/assets/68729523/c86d4511-3539-4a69-a92f-c0f206232ca4
@T-Dynamos, no, the problem is still the same
@T-Dynamos I removed the environment and updated python from 3.12.2 to 3.12.4 and everything works as intended
@T-Dynamos I apologize for writing in closed issues, but what can you say about quick switching using this method, I personally hide content, because I quickly switch from one to another.
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.transition import MDSlideTransition, MDSharedAxisTransition
kv = """
<MainScreen@MDScreen>:
MDBoxLayout:
orientation: "vertical"
pos_hint: {"center_x": 0.5, "center_y": 0.5}
adaptive_size: True
spacing: "10dp"
MDLabel:
text: "1"
bold: True
halign: "center"
<SecondScreen@MDScreen>:
orientation: "vertical"
MDBoxLayout:
orientation: "vertical"
pos_hint: {"center_x": 0.5, "center_y": 0.5}
adaptive_size: True
spacing: "10dp"
MDLabel:
text: "2"
bold: True
halign: "center"
MDBoxLayout:
orientation: "vertical"
md_bg_color: self.theme_cls.backgroundColor
MDScreenManager:
id: screen_manager
MainScreen:
name: "main_screen"
SecondScreen:
name: "second_screen"
MDBoxLayout:
Widget:
MDButton:
on_release: app.set_screen("main_screen", "right")
pos_hint: {"center_y": 1}
style: "elevated"
MDButtonText:
text: "1"
MDButton:
on_release: app.set_screen("second_screen", "left")
pos_hint: {"center_y": 1}
style: "elevated"
MDButtonText:
text: "2"
Widget:
"""
class App(MDApp):
def build(self):
return Builder.load_string(kv)
def set_screen(self, screen_name, direction=None):
screen_manager = self.root.ids.screen_manager
if direction:
screen_manager.transition = MDSlideTransition(direction=direction)
else:
screen_manager.transition = MDSharedAxisTransition()
screen_manager.current = screen_name
App().run()
Description of the Bug
When you set a Transition, for example, MDSlideTransition and then change to MDSharedAxisTransition, the elements are hidden. A similar effect also occurs with a quick change of MDSlideTransition, etc.
Code and Logs
Versions