public class PlayLayout extends RelativeLayout
| Modifier and Type | Class and Description |
|---|---|
static class |
PlayLayout.Builder
Builder for creation PlayLayout.
|
static interface |
PlayLayout.OnButtonsClickListener
Interface for buttons click listeners
|
static class |
PlayLayout.OnButtonsClickListenerAdapter
Adapter for buttons click listener
|
static interface |
PlayLayout.OnButtonsLongClickListener
Interface for buttons long click listener
|
static class |
PlayLayout.OnButtonsLongClickListenerAdapter
Adapter for buttons long click listener
|
static interface |
PlayLayout.OnProgressChangedListener
Interface for sending events about changing of progress by user interaction.
|
static class |
PlayLayout.ShadowPercentageProvider |
RelativeLayout.LayoutParamsViewGroup.MarginLayoutParams, ViewGroup.OnHierarchyChangeListenerView.AccessibilityDelegate, View.BaseSavedState, View.DragShadowBuilder, View.MeasureSpec, View.OnApplyWindowInsetsListener, View.OnAttachStateChangeListener, View.OnClickListener, View.OnContextClickListener, View.OnCreateContextMenuListener, View.OnDragListener, View.OnFocusChangeListener, View.OnGenericMotionListener, View.OnHoverListener, View.OnKeyListener, View.OnLayoutChangeListener, View.OnLongClickListener, View.OnScrollChangeListener, View.OnSystemUiVisibilityChangeListener, View.OnTouchListener| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_DURATION |
static float |
SMALL_SHADOW_OPACITY |
ABOVE, ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_END, ALIGN_LEFT, ALIGN_PARENT_BOTTOM, ALIGN_PARENT_END, ALIGN_PARENT_LEFT, ALIGN_PARENT_RIGHT, ALIGN_PARENT_START, ALIGN_PARENT_TOP, ALIGN_RIGHT, ALIGN_START, ALIGN_TOP, BELOW, CENTER_HORIZONTAL, CENTER_IN_PARENT, CENTER_VERTICAL, END_OF, LEFT_OF, RIGHT_OF, START_OF, TRUECLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z| Constructor and Description |
|---|
PlayLayout(Context context) |
PlayLayout(Context context,
AttributeSet attrs) |
PlayLayout(Context context,
AttributeSet attrs,
int defStyleAttr) |
PlayLayout(Context context,
AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(View child) |
void |
addView(View child,
int index) |
void |
addView(View child,
int width,
int height) |
void |
addView(View child,
int index,
ViewGroup.LayoutParams params) |
void |
addView(View child,
ViewGroup.LayoutParams params) |
void |
fastOpen() |
ImageView |
getIvRepeat()
Getter for ImageView repeat button
|
ImageView |
getIvShuffle()
Getter for ImageView shuffle button
|
ImageView |
getIvSkipNext()
Getter for ImageView skip next button
|
ImageView |
getIvSkipPrevious()
Getter for ImageView skip previous button
|
FloatingActionButton |
getPlayButton()
Getter for ImageView playButton button
|
boolean |
isOpen()
Check if diffusers open
|
protected void |
onAttachedToWindow() |
protected void |
onDetachedFromWindow() |
protected void |
onLayout(boolean changed,
int l,
int t,
int r,
int b) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
void |
onRestoreInstanceState(Parcelable state) |
Parcelable |
onSaveInstanceState() |
void |
setBigDiffuserColor(int color)
Set big diffuser color
|
void |
setBigDiffuserColorResource(int colorRes)
Set big diffuser color from color resources
|
void |
setBigDiffuserShadowWidth(int shadowWidth)
Set shadow width for big diffuser
|
void |
setBigDiffuserShadowWidthResource(int shadowWidth)
Set shadow width for big diffuser with dimension
|
void |
setButtonsSize(int buttonsSize)
Set size for buttons (shuffle, previous, next, repeat)
|
void |
setButtonsSizeResource(int buttonsSizeRes)
Set size for buttons (shuffle, previous, next, repeat) from resources
|
void |
setDiffusersPadding(int padding)
Set padding for diffusers
|
void |
setDiffusersPaddingResource(int paddingRes)
Set padding for diffusers from dimen resources
|
void |
setImageBitmap(Bitmap bm)
Sets a Bitmap as the content of this ImageView.
|
void |
setImageDrawable(Drawable drawable)
Sets a drawable as the content of this ImageView.
|
void |
setImageResource(int resId)
Sets a drawable as the content of this ImageView.
|
void |
setImageURI(Uri uri)
Sets the content of this ImageView to the specified Uri.
|
void |
setMediumDiffuserColor(int color)
Set medium diffuser color
|
void |
setMediumDiffuserColorResource(int colorRes)
Set medium diffuser color from color res
|
void |
setMediumDiffuserShadowWidth(int shadowWidth)
Set shadow width for medium diffuser
|
void |
setMediumDiffuserShadowWidthResource(int shadowWidth)
Set shadow width for big medium with dimension
|
void |
setOnButtonsClickListener(PlayLayout.OnButtonsClickListener listener)
Set OnButtonsClickListener for layout
|
void |
setOnButtonsLongClickListener(PlayLayout.OnButtonsLongClickListener listener)
Set OnButtonsLongClickListener for layout
|
void |
setOnProgressChangedListener(PlayLayout.OnProgressChangedListener progressChangedListener)
Set progressChangedListener
|
void |
setPlayButtonBackgroundTintList(ColorStateList tint)
Set fab player background tint
|
void |
setPostProgress(float progress)
Set progress for progress line view.
|
void |
setProgress(float progress)
Set progress for progress line view
|
void |
setProgressBallColor(int color)
Set color for progress ball indicator
|
void |
setProgressBallColorResource(int colorRes)
Set color for progress ball indicator from resources
|
void |
setProgressBallRadius(float radius)
Set radius for progress line ball indicator
|
void |
setProgressBallRadiusResource(int radiusRes)
Set radius for progress line ball indicator from dimen resources
|
void |
setProgressCompleteColor(int color)
Set progress complete line color
|
void |
setProgressCompleteColorResource(int colorRes)
Set progress complete line color from resource
|
void |
setProgressCompleteLineStrokeWidth(float strokeWidth)
Set progress complete line stroke width
|
void |
setProgressCompleteLineStrokeWidthResource(int strokeWidthRes)
Set progress complete line stroke width from dimen resources
|
void |
setProgressEnabled(boolean enabled)
Enable or disable the progress line view.
|
void |
setProgressLineColor(int color)
Set progress line color
|
void |
setProgressLineColorResource(int colorRes)
Set progress line color from resource
|
void |
setProgressLinePadding(float padding)
Set padding for progress line
|
void |
setProgressLinePadding(int padding)
Set padding for progress line
|
void |
setProgressLinePaddingResource(int paddingRes)
Set padding for progress line from dimen resources
|
void |
setProgressLineStrokeWidth(float strokeWidth)
Set progress line stroke width
|
void |
setProgressLineStrokeWidthResource(int strokeWidthRes)
Set progress line stroke width from dimen resources
|
void |
setShadowProvider(PlayLayout.ShadowPercentageProvider provider)
Set shadow provider
|
void |
setSmallDiffuserShadowWidth(int shadowWidth)
Set shadow width for small diffuser
|
void |
setSmallDiffuserShadowWidthResource(int shadowWidth)
Set shadow width for big small with dimension
|
void |
shadowChanged(float bigDiffuserShadowPercentage,
float mediumDiffuserShadowPercentage,
float smallDiffuserShadowPercentage)
Set shadow percentages for diffusers.
|
void |
startDismissAnimation() |
void |
startRevealAnimation() |
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getBaseline, getGravity, requestLayout, setGravity, setHorizontalGravity, setIgnoreGravity, setVerticalGravity, shouldDelayChildPressedStateaddChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDraw, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRtlPropertiesChanged, onScreenStateChanged, onScrollChanged, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindowspublic static final int DEFAULT_DURATION
public static final float SMALL_SHADOW_OPACITY
public PlayLayout(Context context)
public PlayLayout(Context context, AttributeSet attrs)
public PlayLayout(Context context, AttributeSet attrs, int defStyleAttr)
public PlayLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
onMeasure in class RelativeLayoutprotected void onLayout(boolean changed,
int l,
int t,
int r,
int b)
onLayout in class RelativeLayoutpublic void addView(View child, int index, ViewGroup.LayoutParams params)
public void addView(View child, ViewGroup.LayoutParams params)
addView in interface ViewManageraddView in class ViewGrouppublic void addView(View child, int width, int height)
public void setOnButtonsClickListener(PlayLayout.OnButtonsClickListener listener)
listener - -> OnButtonsClickListenerpublic void setOnButtonsLongClickListener(PlayLayout.OnButtonsLongClickListener listener)
listener - -> OnButtonsLongClickListenerpublic void fastOpen()
public void startRevealAnimation()
public void startDismissAnimation()
public void setProgress(float progress)
progress - the progress in percentage. (0.0 - 1.0f)public void setPostProgress(float progress)
progress - the progress in percentage. (0.0 - 1.0f)public void setImageResource(int resId)
resId - the resource identifier of the drawable.public void setImageDrawable(Drawable drawable)
drawable - the Drawable to set, or null to clear the content.public void setImageURI(Uri uri)
uri - the Uri of an image, or null to clear the contentpublic void setImageBitmap(Bitmap bm)
bm - The bitmap to set.public void setButtonsSize(int buttonsSize)
buttonsSize - Size for buttonspublic void setButtonsSizeResource(int buttonsSizeRes)
buttonsSizeRes - dimen resource size for buttonspublic void setProgressEnabled(boolean enabled)
enabled - requested enable statepublic void setBigDiffuserShadowWidth(int shadowWidth)
shadowWidth - shadow width for big diffuserpublic void setBigDiffuserShadowWidthResource(int shadowWidth)
shadowWidth - dimen resource shadow width for big diffuserpublic void setMediumDiffuserShadowWidth(int shadowWidth)
shadowWidth - shadow width for big diffuserpublic void setMediumDiffuserShadowWidthResource(int shadowWidth)
shadowWidth - dimen resource shadow width for medium diffuserpublic void setSmallDiffuserShadowWidth(int shadowWidth)
shadowWidth - shadow width for big diffuserpublic void setSmallDiffuserShadowWidthResource(int shadowWidth)
shadowWidth - dimen resource shadow width for small diffuserpublic void setBigDiffuserColor(int color)
color - Color for big diffuserpublic void setBigDiffuserColorResource(int colorRes)
colorRes - Color resource color for big diffuserpublic void setMediumDiffuserColor(int color)
color - Color for medium diffuserpublic void setMediumDiffuserColorResource(int colorRes)
colorRes - Color resource color for medium diffuserpublic void setPlayButtonBackgroundTintList(ColorStateList tint)
tint - ColorStateList as a background tint for FloatingActionButtonpublic void setProgressLinePadding(int padding)
padding - Padding for progress linepublic void setProgressLinePadding(float padding)
padding - Padding for progress linepublic void setProgressLinePaddingResource(int paddingRes)
paddingRes - dimen resource Padding for progress linepublic void setDiffusersPadding(int padding)
padding - Padding for diffusers in pixelspublic void setDiffusersPaddingResource(int paddingRes)
paddingRes - dimen resource Padding for diffuserspublic void setProgressBallRadius(float radius)
radius - Radius for progress line ball indicatorpublic void setProgressBallRadiusResource(int radiusRes)
radiusRes - dimen res Radius for progress line ball indicatorpublic void setProgressCompleteLineStrokeWidth(float strokeWidth)
strokeWidth - width for complete progress linepublic void setProgressCompleteLineStrokeWidthResource(int strokeWidthRes)
strokeWidthRes - dimen resource width for complete progress linepublic void setProgressLineStrokeWidth(float strokeWidth)
strokeWidth - width for progress linepublic void setProgressLineStrokeWidthResource(int strokeWidthRes)
strokeWidthRes - dimen resource width for progress linepublic void setProgressLineColor(int color)
color - Color for progress linepublic void setProgressLineColorResource(int colorRes)
colorRes - Color res Color for progress linepublic void setProgressCompleteColor(int color)
color - Color for progress complete linepublic void setProgressCompleteColorResource(int colorRes)
colorRes - Color res Color for progress complete linepublic void setProgressBallColor(int color)
color - Color for progress ball indicatorpublic void setProgressBallColorResource(int colorRes)
colorRes - Color resource Color for progress ball indicatorpublic void setOnProgressChangedListener(PlayLayout.OnProgressChangedListener progressChangedListener)
progressChangedListener - PlayLayout.OnProgressChangedListener listener for the event;public boolean isOpen()
public void setShadowProvider(PlayLayout.ShadowPercentageProvider provider)
provider - ShadowPercentageProviderpublic void shadowChanged(float bigDiffuserShadowPercentage,
float mediumDiffuserShadowPercentage,
float smallDiffuserShadowPercentage)
bigDiffuserShadowPercentage - shadow percentage for big diffuser (0.0f - 1.0f)mediumDiffuserShadowPercentage - shadow percentage for medium diffuser (0.0f - 1.0f)smallDiffuserShadowPercentage - shadow percentage for small diffuser (0.0f - 1.0f)public ImageView getIvShuffle()
public ImageView getIvSkipPrevious()
public ImageView getIvSkipNext()
public ImageView getIvRepeat()
public FloatingActionButton getPlayButton()
protected void onAttachedToWindow()
onAttachedToWindow in class ViewGroupprotected void onDetachedFromWindow()
onDetachedFromWindow in class ViewGrouppublic Parcelable onSaveInstanceState()
onSaveInstanceState in class Viewpublic void onRestoreInstanceState(Parcelable state)
onRestoreInstanceState in class View