Table Of Contents
Action Bar¶
バージョン 1.8.0 で追加.
The ActionBar widget is like Android’s ActionBar , where items are stacked horizontally.
An ActionBar には、さまざまな ContextualActionViews を持つ :class:`ActionView が含まれています。 ActionView には、title、app_icon、およびprevious_iconプロパティを持つ ActionPrevious が含まれます。 ActionView には、 ActionItems のサブクラスが含まれます。 あらかじめ定義されているものには、 :class:`ActionButton 、 ActionToggleButton 、ActionCheck 、 ActionSeparator 、 class:ActionGroup などがあります。
ActionGroup は、グループ内に ActionItems を表示するために使用されます。 :class:`ActionView は、他の ActionItems の後に :class:`ActionGroup を常に表示します。 ActionView には ActionOverflow が含まれます。 ContextualActionView は、ActionView のサブクラスです。
-
class
kivy.uix.actionbar.ActionItem[ソース]¶ ベースクラス:
builtins.objectActionItemクラスはすべてのActionBarウィジェットの抽象クラスです。 ActionBarのカスタムwidget を作成するにはこのクラスから継承します。 詳細については、モジュールのマニュアルを参照してください。
-
background_down¶ Background image of the ActionItem used for default graphical representation when an ActionItem is pressed.
background_downis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/action_item_down’.
-
background_normal¶ Background image of the ActionItem used for the default graphical representation when the ActionItem is not pressed.
background_normalis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/action_item’.
-
important¶ Determines if an ActionItem is important or not.
importantis aBooleanPropertyand defaults to False.
-
inside_group¶ (internal) Determines if an ActionItem is displayed inside an ActionGroup or not.
inside_groupis aBooleanPropertyand defaults to False.
-
minimum_width¶ Minimum Width required by an ActionItem.
minimum_widthis aNumericPropertyand defaults to ‘90sp’.
-
mipmap¶ Defines whether the image/icon dispayed on top of the button uses a mipmap or not.
mipmapis aBooleanPropertyand defaults to True.
-
pack_width¶ (read-only) The actual width to use when packing the item. Equal to the greater of minimum_width and width.
pack_widthis anAliasProperty.
-
-
class
kivy.uix.actionbar.ActionButton(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.button.Button,kivy.uix.actionbar.ActionItemActionButton class, see module documentation for more information.
The text color, width and size_hint_x are set manually via the Kv language file. It covers a lot of cases: with/without an icon, with/without a group and takes care of the padding between elements.
You don’t have much control over these properties, so if you want to customize it’s appearance, we suggest you create you own button representation. You can do this by creating a class that subclasses an existing widget and an
ActionItem:class MyOwnActionButton(Button, ActionItem): pass
You can then create your own style using the Kv language.
-
icon¶ Source image to use when the Button is part of the ActionBar. If the Button is in a group, the text will be preferred.
-
-
class
kivy.uix.actionbar.ActionToggleButton(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionItem,kivy.uix.togglebutton.ToggleButtonActionToggleButton class, see module documentation for more information.
-
icon¶ Source image to use when the Button is part of the ActionBar. If the Button is in a group, the text will be preferred.
-
-
class
kivy.uix.actionbar.ActionCheck(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionItem,kivy.uix.checkbox.CheckBoxActionCheck class, see module documentation for more information.
-
class
kivy.uix.actionbar.ActionSeparator(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionItem,kivy.uix.widget.WidgetActionSeparator class, see module documentation for more information.
-
background_image¶ Background image for the separators default graphical representation.
background_imageis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/separator’.
-
-
class
kivy.uix.actionbar.ActionDropDown(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.dropdown.DropDownActionDropDown class, see module documentation for more information.
-
class
kivy.uix.actionbar.ActionGroup(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionItem,kivy.uix.spinner.SpinnerActionGroup class, see module documentation for more information.
-
dropdown_width¶ If non zero, provides the width for the associated DropDown. This is useful when some items in the ActionGroup’s DropDown are wider than usual and you don’t want to make the ActionGroup widget itself wider.
dropdown_widthis anNumericPropertyand defaults to 0.バージョン 1.10.0 で追加.
-
mode¶ Sets the current mode of an ActionGroup. If mode is ‘normal’, the ActionGroups children will be displayed normally if there is enough space, otherwise they will be displayed in a spinner. If mode is ‘spinner’, then the children will always be displayed in a spinner.
modeis aOptionPropertyand defaults to ‘normal’.
-
separator_image¶ Background Image for an ActionSeparator in an ActionView.
separator_imageis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/separator’.
-
separator_width¶ Width of the ActionSeparator in an ActionView.
separator_widthis aNumericPropertyand defaults to 0.
-
use_separator¶ Specifies whether to use a separator after/before this group or not.
use_separatoris aBooleanPropertyand defaults to False.
-
-
class
kivy.uix.actionbar.ActionOverflow(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionGroupActionOverflow class, see module documentation for more information.
-
overflow_image¶ Image to be used as an Overflow Image.
overflow_imageis anObjectPropertyand defaults to ‘atlas://data/images/defaulttheme/overflow’.
-
-
class
kivy.uix.actionbar.ActionView(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.boxlayout.BoxLayoutActionView class, see module documentation for more information.
-
action_previous¶ Previous button for an ActionView.
action_previousis anObjectPropertyand defaults to None.
-
background_color¶ Background color in the format (r, g, b, a).
background_coloris aListPropertyand defaults to [1, 1, 1, 1].
-
background_image¶ Background image of an ActionViews default graphical representation.
background_imageis anStringPropertyand defaults to ‘atlas://data/images/defaulttheme/action_view’.
-
overflow_group¶ Widget to be used for the overflow.
overflow_groupis anObjectPropertyand defaults to an instance ofActionOverflow.
-
use_separator¶ Specify whether to use a separator before every ActionGroup or not.
use_separatoris aBooleanPropertyand defaults to False.
-
-
class
kivy.uix.actionbar.ContextualActionView(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.actionbar.ActionViewContextualActionView class, see the module documentation for more information.
-
class
kivy.uix.actionbar.ActionPrevious(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.boxlayout.BoxLayout,kivy.uix.actionbar.ActionItemActionPrevious class, see module documentation for more information.
-
app_icon¶ Application icon for the ActionView.
app_iconis aStringPropertyand defaults to the window icon if set, otherwise ‘data/logo/kivy-icon-32.png’.
-
app_icon_height¶ Height of app_icon image.
-
app_icon_width¶ Width of app_icon image.
-
color¶ Text color, in the format (r, g, b, a)
coloris aListPropertyand defaults to [1, 1, 1, 1].
-
previous_image¶ Image for the ‘previous’ ActionButtons default graphical representation.
previous_imageis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/previous_normal’.
-
previous_image_height¶ Height of previous_image image.
-
previous_image_width¶ Width of previous_image image.
-
title¶ Title for ActionView.
titleis aStringPropertyand defaults to ‘’.
-
with_previous¶ Specifies whether clicking on ActionPrevious will load the previous screen or not. If True, the previous_icon will be shown otherwise it will not.
with_previousis aBooleanPropertyand defaults to True.
-
-
class
kivy.uix.actionbar.ActionBar(**kwargs)[ソース]¶ ベースクラス:
kivy.uix.boxlayout.BoxLayoutActionBar, see the module documentation for more information.
Events: - on_previous
Fired when action_previous of action_view is pressed.
-
action_view¶ action_view of ActionBar.
action_viewis anObjectPropertyand defaults to an instance of ActionView.
-
background_color¶ Background color, in the format (r, g, b, a).
background_coloris aListPropertyand defaults to [1, 1, 1, 1].
-
background_image¶ Background image of the ActionBars default graphical representation.
background_imageis anStringPropertyand defaults to ‘atlas://data/images/defaulttheme/action_bar’.
-
border¶ borderto be applied to thebackground_image.