擅长:python、mysql、java
<p>您只需在kv字符串中使用<code>anchor_title: "center"</code></p>
<p>您的代码应该如下所示:</p>
<pre><code>kv = Builder.load_string(
"""
<SM>
P1:
<P1>
BoxLayout:
orientation: 'vertical'
MDToolbar:
id: toolbar
title: 'TEST'
anchor_title: "center"
""")
</code></pre>