public interface Arithmetics
TabSwitcher
's children, must implement.Modifier and Type | Interface and Description |
---|---|
static class |
Arithmetics.Axis
Contains all axes on which the tabs of a
TabSwitcher can be moved. |
Modifier and Type | Method and Description |
---|---|
void |
animatePosition(Arithmetics.Axis axis,
android.view.ViewPropertyAnimator animator,
AbstractItem item,
float position)
Animates the position of an item on a specific axis.
|
void |
animatePosition(Arithmetics.Axis axis,
android.view.ViewPropertyAnimator animator,
AbstractItem item,
float position,
boolean includePadding)
Animates the position of an item on a specific axis.
|
void |
animateRotation(Arithmetics.Axis axis,
android.view.ViewPropertyAnimator animator,
float angle)
Animates the rotation of an item on a specific axis.
|
void |
animateScale(Arithmetics.Axis axis,
android.view.ViewPropertyAnimator animator,
float scale)
Animates the scale of an item on a specific axis.
|
float |
getPivot(Arithmetics.Axis axis,
AbstractItem item,
AbstractDragTabsEventHandler.DragState dragState)
Returns the pivot of an item on a specific axis, depending on the current drag state.
|
float |
getPosition(Arithmetics.Axis axis,
AbstractItem item)
Returns the position of a specific item on a specific axis.
|
float |
getRotation(Arithmetics.Axis axis,
AbstractItem item)
Returns the rotation of an item on a specific axis.
|
float |
getScale(AbstractItem item)
Returns the scale of an item, depending on its margin.
|
float |
getScale(AbstractItem item,
boolean includePadding)
Returns the scale of an item, depending on its margin.
|
float |
getSize(Arithmetics.Axis axis,
AbstractItem item)
Returns the size of an item on a specific axis.
|
float |
getTabContainerSize(Arithmetics.Axis axis)
Returns the size of the container, which contains the tab switcher's tabs, on a specific
axis.
|
float |
getTabContainerSize(Arithmetics.Axis axis,
boolean includePadding)
Returns the size of the container, which contains the tab switcher's tabs, on a specific
axis.
|
int |
getTabSwitcherPadding(Arithmetics.Axis axis,
int gravity)
Returns the padding of the tab switcher on a specific axis and using a specific gravity.
|
float |
getTouchPosition(Arithmetics.Axis axis,
android.view.MotionEvent event)
Returns the position of a touch event on a specific axis.
|
void |
setPivot(Arithmetics.Axis axis,
AbstractItem item,
float pivot)
Sets the pivot of an item on a specific axis.
|
void |
setPosition(Arithmetics.Axis axis,
AbstractItem item,
float position)
Sets the position of an item on a specific axis.
|
void |
setRotation(Arithmetics.Axis axis,
AbstractItem item,
float angle)
Sets the rotation of an item on a specific axis.
|
void |
setScale(Arithmetics.Axis axis,
AbstractItem item,
float scale)
Sets the scale of an item on a specific axis.
|
int getTabSwitcherPadding(@NonNull Arithmetics.Axis axis, int gravity)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullgravity
- The gravity as an Integer
value. The gravity must be
Gravity.START
or Gravity.END
Integer
valuefloat getTabContainerSize(@NonNull Arithmetics.Axis axis)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullFloat
valuefloat getTabContainerSize(@NonNull Arithmetics.Axis axis, boolean includePadding)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullincludePadding
- True, if the padding and the size of the toolbars should be included, false
otherwiseFloat
valuefloat getTouchPosition(@NonNull Arithmetics.Axis axis, @NonNull android.view.MotionEvent event)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullevent
- The touch event, whose position should be returned, as an instance of the class
MotionEvent
. The motion event may not be nullFloat
valuefloat getPosition(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose position should be returned, as an instance of the class AbstractItem
. The item may not be nullFloat
valuevoid setPosition(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item, float position)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose position should be set, as an instance of the class AbstractItem
. The item may not be nullposition
- The position, which should be set, as a Float
valuevoid animatePosition(@NonNull Arithmetics.Axis axis, @NonNull android.view.ViewPropertyAnimator animator, @NonNull AbstractItem item, float position)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullanimator
- The animator, which should be used to animate the position, as an instance of the
class ViewPropertyAnimator
. The animator may not be nullitem
- The item, whose position should be animated, as an instance of the class View
. The view may not be nullposition
- The position, which should be set by the animation, as a Float
valuevoid animatePosition(@NonNull Arithmetics.Axis axis, @NonNull android.view.ViewPropertyAnimator animator, @NonNull AbstractItem item, float position, boolean includePadding)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullanimator
- The animator, which should be used to animate the position, as an instance of the
class ViewPropertyAnimator
. The animator may not be nullitem
- The item, whose position should be animated, as an instance of the class View
. The view may not be nullposition
- The position, which should be set by the animation, as a Float
valueincludePadding
- True, if the item's padding should be taken into account, false otherwisefloat getScale(@NonNull AbstractItem item)
item
- The item, whose scale should be returned, as an instance of the class AbstractItem
. The item may not be nullFloat
valuefloat getScale(@NonNull AbstractItem item, boolean includePadding)
item
- The item, whose scale should be returned, as an instance of the class AbstractItem
. The item may not be nullincludePadding
- True, if the item's padding should be taken into account as well, false otherwiseFloat
valuevoid setScale(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item, float scale)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose scale should be set, as an instance of the class AbstractItem
. The item may not be nullscale
- The scale, which should be set, as a Float
valuevoid animateScale(@NonNull Arithmetics.Axis axis, @NonNull android.view.ViewPropertyAnimator animator, float scale)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullanimator
- The animator, which should be used to animate the scale, as an instance of the class
ViewPropertyAnimator
. The animator may not be nullscale
- The scale, which should be set by the animation, as a Float
valuefloat getSize(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose size should be returned, as an instance of the class AbstractItem
. The item may not be nullFloat
valuefloat getPivot(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item, @NonNull AbstractDragTabsEventHandler.DragState dragState)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose pivot should be returned, as an instance of the class AbstractItem
. The item may not be nulldragState
- The current drag state as a value of the enum AbstractDragTabsEventHandler.DragState
. The drag state may
not be nullFloat
valuevoid setPivot(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item, float pivot)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose pivot should be set, as an instance of the class View
. The
item may not be nullpivot
- The pivot, which should be set, as a Float
valuefloat getRotation(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose rotation should be returned, as an instance of the class AbstractItem
. The item may not be nullFloat
valuevoid setRotation(@NonNull Arithmetics.Axis axis, @NonNull AbstractItem item, float angle)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullitem
- The item, whose rotation should be set, as an instance of the class AbstractItem
. The item may not be nullangle
- The rotation, which should be set, as a Float
valuevoid animateRotation(@NonNull Arithmetics.Axis axis, @NonNull android.view.ViewPropertyAnimator animator, float angle)
axis
- The axis as a value of the enum Arithmetics.Axis
. The axis may not be nullanimator
- The animator, should be used to animate the rotation, as an instance of the class
ViewPropertyAnimator
. The animator may not be nullangle
- The rotation, which should be set by the animation, as a Float
value