public class

ActionPathMenu.CircularLayoutBuilder

extends Object
java.lang.Object
   ↳ com.droidux.pack.action.widget.ActionPathMenu.CircularLayoutBuilder

Class Overview

The helper class to build a circular path menu.

Summary

Public Methods
ActionPathMenu.CircularLayoutBuilder addAction(ActionInterfaces.Item.ActionItem action)
Adds the action to the menu.
ActionPathMenu.CircularLayoutBuilder addActions(List<ActionInterfaces.Item.ActionItem> actions)
Adds a list of actions to the menu.
void endLayout()
This will end the layout process.
ActionPathMenu.CircularLayoutBuilder setAnimationDuration(int millis)
How long the animation to expand/collapse the menu should last.
ActionPathMenu.CircularLayoutBuilder setAnimationFactory(ActionPathMenu.AnimationFactory factory)
You can override the animations use by the menu, eg.
ActionPathMenu.CircularLayoutBuilder setArcParams(int radius, int startAngle, int sweepAngle)
Customize the shape of the circle/arc path.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public ActionPathMenu.CircularLayoutBuilder addAction (ActionInterfaces.Item.ActionItem action)

Since: API Level 2.5

Adds the action to the menu.

Parameters
action The action to be added.
Returns
  • this

public ActionPathMenu.CircularLayoutBuilder addActions (List<ActionInterfaces.Item.ActionItem> actions)

Since: API Level 2.5

Adds a list of actions to the menu.

Parameters
actions The action to be added.
Returns
  • this

public void endLayout ()

Since: API Level

This will end the layout process.

public ActionPathMenu.CircularLayoutBuilder setAnimationDuration (int millis)

Since: API Level 2.5

How long the animation to expand/collapse the menu should last. The duration cannot be negative.

Parameters
millis Duration in milliseconds.
Returns
  • this

public ActionPathMenu.CircularLayoutBuilder setAnimationFactory (ActionPathMenu.AnimationFactory factory)

Since: API Level 2.5

You can override the animations use by the menu, eg. expand/collapse animation, by providing an implementation of the ActionPathMenu.AnimationFactory.

Parameters
factory This will provide the animations to be used by the menu.
Returns
  • this

public ActionPathMenu.CircularLayoutBuilder setArcParams (int radius, int startAngle, int sweepAngle)

Since: API Level 2.5

Customize the shape of the circle/arc path.

If the start angle is negative or >= 360, the start angle is treated as start angle modulo 360.

If the sweep angle is >= 360, then the circle is drawn completely. If the sweep angle is negative, the sweep angle is treated as sweep angle modulo 360.

The arc is drawn clockwise. An angle of 0 degrees correspond to the geometric angle of 0 degrees (3 o'clock on a watch.)

Parameters
radius The radius of the circle/arc.
startAngle Starting angle (in degrees) where the arc begins.
sweepAngle Sweep angle (in degrees) measured clockwise.
Returns
  • this