public class

ContextualToolbarSubMenu

extends ViewGroup
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ com.pspdfkit.ui.toolbar.ContextualToolbarSubMenu

Class Overview

This view is a component of contextual toolbar. It represents a submenu. The contextual toolbar will display items in this submenu below the main menu bar.

Note: This view wraps ContextualToolbarMenuBar in a horizontal or vertical scroll view (depending on its position). This allows to display more ContextualToolbarMenuItems than fits the toolbar width.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
ContextualToolbarSubMenu(Context context)
ContextualToolbarSubMenu(Context context, AttributeSet attrs)
ContextualToolbarSubMenu(Context context, AttributeSet attrs, int defStyleAttr)
Public Methods
ContextualToolbarMenuBar getMenuBar()
Returns menu bar with ContextualToolbarMenuItems show in this submenu.
Completable hideMenuItems(boolean animate)
void removeAllViews()
void setBackgroundColor(int color)
void setMenuItems(List<ContextualToolbarMenuItem> newItems)
Sets menu items to the toolbar.
Completable showMenuItems(boolean animate)
Protected Methods
void onLayout(boolean changed, int l, int t, int r, int b)
void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
[Expand]
Inherited Methods
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public ContextualToolbarSubMenu (Context context)

public ContextualToolbarSubMenu (Context context, AttributeSet attrs)

public ContextualToolbarSubMenu (Context context, AttributeSet attrs, int defStyleAttr)

Public Methods

public ContextualToolbarMenuBar getMenuBar ()

Returns menu bar with ContextualToolbarMenuItems show in this submenu.

Returns

public Completable hideMenuItems (boolean animate)

public void removeAllViews ()

public void setBackgroundColor (int color)

public void setMenuItems (List<ContextualToolbarMenuItem> newItems)

Sets menu items to the toolbar. If the specified position is START, the items will be added to the far left or bottom if vertical, otherwise to the far right or top if vertical. This only prepares the items (they're scaled to 0f). Once you need to display them, call showMenuItems(boolean).

Parameters
newItems Items to be added to this toolbar menu bar.

public Completable showMenuItems (boolean animate)

Protected Methods

protected void onLayout (boolean changed, int l, int t, int r, int b)

protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec)