<SivaStatusScreen>:
name: 'status_screen'
canvas.before:
Color:
rgba: 255/255, 255/255, 255/255, 1
Rectangle:
pos: self.pos
size: self.size
AnchorLayout:
id: status_add
anchor_x: 'right'
anchor_y: 'bottom'
ImageButton:
id: status_addbtn
source: {'normal': 'images/plus-96.png', 'down': 'images/plusblue-96.png'} [self.state]
size_hint: 0.2, 0.2
on_release: root.new_status_entry()
BoxLayout:
id: status_layout
size_hint: 1, 1
orientation: 'vertical'
BoxLayout:
id: actionbar_layout
size_hint: 1, 0.1
ActionBar:
id: status_actionbar
pos_hint: {'top': 1}
background_image: ''
background_color: 195/255, 60/255, 35/255, 1
ActionView:
use_separator: True
ActionPrevious:
title: 'SIVA'
with_previous: False
ActionOverflow:
CustomActionButton:
id: status-button
important: True
source: {'normal': 'images/communicationgreen-48.png', 'down': 'images/communication-48.png'} [self.state]
on_release: root.to_statusscreen()
CustomActionButton:
id: accounts-button
important: True
source: {'normal': 'images/key-48.png', 'down': 'images/keygreen-48.png'} [self.state]
on_release: root.to_accountsscreen()
CustomActionButton:
id: bot-button
important: True
source: {'normal': 'images/bot-48.png', 'down': 'images/botgreen-48.png'} [self.state]
on_release: root.to_botscreen()
CustomActionButton:
id: logout-button
important: True
source: {'normal': 'images/shutdown-48.png', 'down': 'images/shutdowngreen-48.png'} [self.state]
on_release: root.to_logout()
BoxLayout:
id: status_display
size_hint: 1, 0.9
class SivaStatusScreen(Screen):
pass
Great to see you using the inspector. A wonderful tool to see what is going on especially with Layouts.
If you size the element you want fixed, the BoxLayout will do the rest.
I created a standalone example from your code. Relevant changes highlighted.
from kivy.app import App
from kivy.lang import Builder
kv = """
<SivaStatusScreen@Screen>:
name: 'status_screen'
canvas.before:
Color:
rgba: 255/255, 255/255, 255/255, 1
Rectangle:
pos: self.pos
size: self.size
AnchorLayout:
id: status_add
anchor_x: 'right'
anchor_y: 'bottom'
Button:
id: status_addbtn
text: 'button in anchor layout'
# source: {'normal': 'images/plus-96.png', 'down': 'images/plusblue-96.png'} [self.state]
size_hint: 0.2, 0.2
on_release: root.new_status_entry()
BoxLayout:
id: status_layout
#size_hint: 1, 1 # This is the default, not required.
orientation: 'vertical'
BoxLayout:
id: actionbar_layout
size_hint_y: None # Size this BoxLayout to contain the ActionBar.
height: 48
ActionBar:
id: status_actionbar
pos_hint: {'top': 1}
background_image: ''
background_color: 195/255, 60/255, 35/255, 1
ActionView:
use_separator: True
ActionPrevious:
title: 'SIVA'
with_previous: False
ActionOverflow:
ActionButton:
id: status-button
important: True
source: {'normal': 'images/communicationgreen-48.png', 'down': 'images/communication-48.png'} [self.state]
on_release: root.to_statusscreen()
ActionButton:
id: accounts-button
important: True
source: {'normal': 'images/key-48.png', 'down': 'images/keygreen-48.png'} [self.state]
on_release: root.to_accountsscreen()
ActionButton:
id: bot-button
important: True
source: {'normal': 'images/bot-48.png', 'down': 'images/botgreen-48.png'} [self.state]
on_release: root.to_botscreen()
ActionButton:
id: logout-button
important: True
source: {'normal': 'images/shutdown-48.png', 'down': 'images/shutdowngreen-48.png'} [self.state]
on_release: root.to_logout()
BoxLayout:
id: status_display
#size_hint: 1, 0.9
# This Layout shares the space with the BoxLayout that has a fixed y size, it will grow to fill the space
BoxLayout:
ScreenManager:
SivaStatusScreen:
"""
class BarLayoutTestApp(App):
def build(self):
return Builder.load_string(kv)
BarLayoutTestApp().run()
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/62afd2d8-74c4-4395-bc01-9a9dbf96c3ce%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/50f4ecb5-2e87-4672-b165-1afdd7c9237b%40googlegroups.com.