The trailing button container should be on the right side of the appbar, but it is not. Also, there appears to not be any text, although there is text specified in the TopAppBarTitle. I’m not sure what’s that about.
Code here:
from kivy.lang import Builder
from kivymd.app import MDApp
KV = """
MDScreen:
md_bg_color: self.theme_cls.secondaryContainerColor
MDTopAppBar:
type: "small"
size_hint_x: .8
pos_hint: {"center_x": .5, "center_y": .5}
MDTopAppBarLeadingButtonContainer:
MDActionTopAppBarButton:
icon: "menu"
MDTopAppBarTitle:
text: "AppBar small"
pos_hint: {"center_x": .5}
MDTopAppBarTrailingButtonContainer:
MDActionTopAppBarButton:
icon: "account-circle-outline"
"""
class TestApp(MDApp):
def build(self):
self.theme_cls.theme_style = "Dark"
return Builder.load_string(KV)
TestApp().run()
And here are the results
I have tried giving pos_hint to the trailing button container but it did not work.