Reputation: 301
I would like to show an 'action bar' on all screens, without copying and pasting the code to all the screens.
My question is if it possible or not?
here is the kv file:
Manager:
Screen_one:
Screen_two:
Screen_three:
<Screen_one>:
GridLayout:
rows: 2
size: root.size
ActionBar:
background_color: 0, .4, .7, 1
size_hint_y: None
height: '35dp'
ActionView:
use_separator: True
ActionPrevious:
title: 'Menu:'
with_previous: False
ActionOverflow:
ActionButton:
important: True
text: 'Print'
Upvotes: 2
Views: 389
Reputation: 16011
Yes, it is possible.
BoxLayout
widgetActionBar
and ScreenManager
widgets as children of rootBoxLayout:
orientation: 'vertical'
ActionBar:
...
ScreenManager:
id: sm
Screen_one:
Screen_two:
Screen_three:
<Screen_one>:
...
Upvotes: 3