我有我的动作栏在kivy上面的代码
ActionBar:
background_color:0,191,255,0.5
pos_hint: {'top':1}
ActionView:
ActionPrevious:
with_previous: False
text:" [b]Dhobiwala.com[/b]"
app_icon:""
### I make app_icon as a blank string...but it takes default icon...I totally want to remove icon from my action bar
markup:True
font_size:"16dp"
on_release:root.Show_Devlopers_Info()
根据上面的代码…我想从状态栏中删除图标…我甚至在Kivy的文档中找不到任何东西…有人有什么想法吗?在
请阅读代码中的注释,以便Frankenstein您首选的隐藏
ActionPrevious
各个方面的方法;删除它似乎不是一个选项,DropDown
当我在Kivy v1.10.0
上尝试时,{没有乐趣,但是可以隐藏部分或全部内容。在似乎无法禁用图标。
参考:Kivy sources@github(https://github.com/kivy/kivy/blob/856b305c0c876e53e802f1ac9ae16c21fa91ac1e/kivy/uix/actionbar.py#L214)。
相关部分:
你可以试着用一个完全透明的小图像作为图标来绕过这个问题。在
此外,您可以尝试将图标的大小减小为0。查看属性
app_icon_width
和app_icon_height
:https://kivy.org/docs/api-kivy.uix.actionbar.html#kivy.uix.actionbar.ActionPrevious.app_icon_height这是一种黑客攻击,但由于}等方法来操作其内容:
kivy.uix.actionbar.ActionPrevious
实际上是BoxLayout
的子类,因此您可以在创建后使用remove_widget()
或{相关问题 更多 >
编程相关推荐