public abstract class PullToRefreshBase<T extends android.view.View> extends android.widget.LinearLayout implements IPullToRefresh<T>
| Modifier and Type | Class and Description |
|---|---|
static class |
PullToRefreshBase.AnimationStyle |
static class |
PullToRefreshBase.Mode |
static interface |
PullToRefreshBase.OnLastItemVisibleListener
Simple Listener that allows you to be notified when the user has scrolled
to the end of the AdapterView.
|
static interface |
PullToRefreshBase.OnPullEventListener<V extends android.view.View>
Listener that allows you to be notified when the user has started or
finished a touch event.
|
static interface |
PullToRefreshBase.OnRefreshListener<V extends android.view.View>
Simple Listener to listen for any callbacks to Refresh.
|
static interface |
PullToRefreshBase.OnRefreshListener2<V extends android.view.View>
An advanced version of the Listener to listen for callbacks to Refresh.
|
static class |
PullToRefreshBase.Orientation |
static class |
PullToRefreshBase.State |
android.widget.LinearLayout.LayoutParamsandroid.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener| Modifier and Type | Field and Description |
|---|---|
static int |
SMOOTH_SCROLL_DURATION_MS |
static int |
SMOOTH_SCROLL_LONG_DURATION_MS |
HORIZONTAL, SHOW_DIVIDER_BEGINNING, SHOW_DIVIDER_END, SHOW_DIVIDER_MIDDLE, SHOW_DIVIDER_NONE, VERTICALCLIP_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, 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_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_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y| Constructor and Description |
|---|
PullToRefreshBase(android.content.Context context) |
PullToRefreshBase(android.content.Context context,
android.util.AttributeSet attrs) |
PullToRefreshBase(android.content.Context context,
PullToRefreshBase.Mode mode) |
PullToRefreshBase(android.content.Context context,
PullToRefreshBase.Mode mode,
PullToRefreshBase.AnimationStyle animStyle) |
| Modifier and Type | Method and Description |
|---|---|
void |
addView(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params) |
protected void |
addViewInternal(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params)
Used internally for adding view.
|
protected void |
addViewInternal(android.view.View child,
android.view.ViewGroup.LayoutParams params)
Used internally for adding view.
|
protected LoadingLayout |
createLoadingLayout(android.content.Context context,
PullToRefreshBase.Mode mode,
android.content.res.TypedArray attrs) |
protected LoadingLayoutProxy |
createLoadingLayoutProxy(boolean includeStart,
boolean includeEnd)
Used internally for
getLoadingLayoutProxy(boolean, boolean). |
protected abstract T |
createRefreshableView(android.content.Context context,
android.util.AttributeSet attrs)
This is implemented by derived classes to return the created View.
|
boolean |
demo()
Demos the Pull-to-Refresh functionality to the user so that they are
aware it is there.
|
protected void |
disableLoadingLayoutVisibilityChanges() |
PullToRefreshBase.Mode |
getCurrentMode()
Get the mode that this view is currently in.
|
boolean |
getFilterTouchEvents()
Returns whether the Touch Events are filtered or not.
|
protected LoadingLayout |
getFooterLayout() |
protected int |
getFooterSize() |
protected LoadingLayout |
getHeaderLayout() |
protected int |
getHeaderSize() |
ILoadingLayout |
getLoadingLayoutProxy()
Returns a proxy object which allows you to call methods on all of the
LoadingLayouts (the Views which show when Pulling/Refreshing).
|
ILoadingLayout |
getLoadingLayoutProxy(boolean includeStart,
boolean includeEnd)
Returns a proxy object which allows you to call methods on the
LoadingLayouts (the Views which show when Pulling/Refreshing).
|
PullToRefreshBase.Mode |
getMode()
Get the mode that this view has been set to.
|
abstract PullToRefreshBase.Orientation |
getPullToRefreshScrollDirection() |
protected int |
getPullToRefreshScrollDuration() |
protected int |
getPullToRefreshScrollDurationLonger() |
T |
getRefreshableView()
Get the Wrapped Refreshable View.
|
protected android.widget.FrameLayout |
getRefreshableViewWrapper() |
boolean |
getShowViewWhileRefreshing()
Get whether the 'Refreshing' View should be automatically shown when
refreshing.
|
PullToRefreshBase.State |
getState() |
protected void |
handleStyledAttributes(android.content.res.TypedArray a)
Allows Derivative classes to handle the XML Attrs without creating a
TypedArray themsevles
|
boolean |
isDisableScrollingWhileRefreshing()
Deprecated.
|
boolean |
isPullToRefreshEnabled()
Whether Pull-to-Refresh is enabled
|
boolean |
isPullToRefreshOverScrollEnabled()
Gets whether Overscroll support is enabled.
|
protected abstract boolean |
isReadyForPullEnd()
Implemented by derived class to return whether the View is in a state
where the user can Pull to Refresh by scrolling from the end.
|
protected abstract boolean |
isReadyForPullStart()
Implemented by derived class to return whether the View is in a state
where the user can Pull to Refresh by scrolling from the start.
|
boolean |
isRefreshing()
Returns whether the Widget is currently in the Refreshing mState
|
boolean |
isScrollingWhileRefreshingEnabled()
Returns whether the widget has enabled scrolling on the Refreshable View
while refreshing.
|
boolean |
onInterceptTouchEvent(android.view.MotionEvent event) |
protected void |
onPtrRestoreInstanceState(android.os.Bundle savedInstanceState)
Called by
onRestoreInstanceState(Parcelable) so that derivative
classes can handle their saved instance state. |
protected void |
onPtrSaveInstanceState(android.os.Bundle saveState)
Called by
onSaveInstanceState() so that derivative classes can
save their instance state. |
protected void |
onPullToRefresh()
Called when the UI has been to be updated to be in the
PullToRefreshBase.State.PULL_TO_REFRESH state. |
void |
onRefreshComplete()
Mark the current Refresh as complete.
|
protected void |
onRefreshing(boolean doScroll)
Called when the UI has been to be updated to be in the
PullToRefreshBase.State.REFRESHING or PullToRefreshBase.State.MANUAL_REFRESHING state. |
protected void |
onReleaseToRefresh()
Called when the UI has been to be updated to be in the
PullToRefreshBase.State.RELEASE_TO_REFRESH state. |
protected void |
onReset()
Called when the UI has been to be updated to be in the
PullToRefreshBase.State.RESET state. |
protected void |
onRestoreInstanceState(android.os.Parcelable state) |
protected android.os.Parcelable |
onSaveInstanceState() |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
protected void |
refreshLoadingViewsSize()
Re-measure the Loading Views height, and adjust internal padding as
necessary
|
protected void |
refreshRefreshableViewSize(int width,
int height) |
void |
setDisableScrollingWhileRefreshing(boolean disableScrollingWhileRefreshing)
Deprecated.
|
void |
setFilterTouchEvents(boolean filterEvents)
Set the Touch Events to be filtered or not.
|
protected void |
setHeaderScroll(int value)
Helper method which just calls scrollTo() in the correct scrolling
direction.
|
void |
setLastUpdatedLabel(java.lang.CharSequence label)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(). |
void |
setLoadingDrawable(android.graphics.drawable.Drawable drawable)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(). |
void |
setLoadingDrawable(android.graphics.drawable.Drawable drawable,
PullToRefreshBase.Mode mode)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(boolean, boolean). |
void |
setLongClickable(boolean longClickable) |
void |
setMode(PullToRefreshBase.Mode mode)
Set the mode of Pull-to-Refresh that this view will use.
|
void |
setOnPullEventListener(PullToRefreshBase.OnPullEventListener<T> listener)
Set OnPullEventListener for the Widget
|
void |
setOnRefreshListener(PullToRefreshBase.OnRefreshListener<T> listener)
Set OnRefreshListener for the Widget
|
void |
setOnRefreshListener(PullToRefreshBase.OnRefreshListener2<T> listener)
Set OnRefreshListener for the Widget
|
void |
setPullLabel(java.lang.CharSequence pullLabel)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(). |
void |
setPullLabel(java.lang.CharSequence pullLabel,
PullToRefreshBase.Mode mode)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(boolean, boolean). |
void |
setPullToRefreshEnabled(boolean enable)
Deprecated.
This simple calls setMode with an appropriate mode based on
the passed value.
|
void |
setPullToRefreshOverScrollEnabled(boolean enabled)
Sets whether Overscroll support is enabled.
|
void |
setRefreshing()
Sets the Widget to be in the refresh state.
|
void |
setRefreshing(boolean doScroll)
Sets the Widget to be in the refresh state.
|
void |
setRefreshingLabel(java.lang.CharSequence refreshingLabel)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(). |
void |
setRefreshingLabel(java.lang.CharSequence refreshingLabel,
PullToRefreshBase.Mode mode)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(boolean, boolean). |
void |
setReleaseLabel(java.lang.CharSequence releaseLabel)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(). |
void |
setReleaseLabel(java.lang.CharSequence releaseLabel,
PullToRefreshBase.Mode mode)
Deprecated.
You should now call this method on the result of
getLoadingLayoutProxy(boolean, boolean). |
void |
setScrollAnimationInterpolator(android.view.animation.Interpolator interpolator)
Sets the Animation Interpolator that is used for animated scrolling.
|
void |
setScrollingWhileRefreshingEnabled(boolean allowScrollingWhileRefreshing)
By default the Widget disables scrolling on the Refreshable View while
refreshing.
|
void |
setShowViewWhileRefreshing(boolean showView)
A mutator to enable/disable whether the 'Refreshing' View should be
automatically shown when refreshing.
|
protected void |
smoothScrollTo(int scrollValue)
Smooth Scroll to position using the default duration of
200 ms.
|
protected void |
smoothScrollTo(int scrollValue,
com.handmark.pulltorefresh.library.PullToRefreshBase.OnSmoothScrollFinishedListener listener)
Smooth Scroll to position using the default duration of
200 ms.
|
protected void |
smoothScrollToLonger(int scrollValue)
Smooth Scroll to position using the longer default duration of
325 ms.
|
protected void |
updateUIForMode()
Updates the View State when the mode has been set.
|
checkLayoutParams, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getBaseline, getBaselineAlignedChildIndex, getDividerDrawable, getDividerPadding, getOrientation, getShowDividers, getWeightSum, isBaselineAligned, isMeasureWithLargestChildEnabled, onDraw, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onLayout, onMeasure, setBaselineAligned, setBaselineAlignedChildIndex, setDividerDrawable, setDividerPadding, setGravity, setHorizontalGravity, setMeasureWithLargestChildEnabled, setOrientation, setShowDividers, setVerticalGravity, setWeightSum, shouldDelayChildPressedStateaddChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, 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, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getOverlay, getPersistentDrawingCache, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCreateDrawableState, onDetachedFromWindow, onInterceptHoverEvent, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, 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, showContextMenuForChild, 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, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, draw, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, 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, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, 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, requestFitSystemWindows, requestLayoutpublic static final int SMOOTH_SCROLL_DURATION_MS
public static final int SMOOTH_SCROLL_LONG_DURATION_MS
public PullToRefreshBase(android.content.Context context)
public PullToRefreshBase(android.content.Context context,
android.util.AttributeSet attrs)
public PullToRefreshBase(android.content.Context context,
PullToRefreshBase.Mode mode)
public PullToRefreshBase(android.content.Context context,
PullToRefreshBase.Mode mode,
PullToRefreshBase.AnimationStyle animStyle)
public void addView(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params)
addView in class android.view.ViewGrouppublic final boolean demo()
IPullToRefreshdemo in interface IPullToRefresh<T extends android.view.View>public final PullToRefreshBase.Mode getCurrentMode()
IPullToRefreshMode.BOTH.getCurrentMode in interface IPullToRefresh<T extends android.view.View>public final boolean getFilterTouchEvents()
IPullToRefreshgetFilterTouchEvents in interface IPullToRefresh<T extends android.view.View>public final ILoadingLayout getLoadingLayoutProxy()
IPullToRefreshgetLoadingLayoutProxy in interface IPullToRefresh<T extends android.view.View>public final ILoadingLayout getLoadingLayoutProxy(boolean includeStart, boolean includeEnd)
IPullToRefreshgetLoadingLayoutProxy in interface IPullToRefresh<T extends android.view.View>includeStart - - Whether to include the Start/Header ViewsincludeEnd - - Whether to include the End/Footer Viewspublic final PullToRefreshBase.Mode getMode()
IPullToRefreshMode.BOTH, you can use getCurrentMode() to
check which mode the view is currently ingetMode in interface IPullToRefresh<T extends android.view.View>public final T getRefreshableView()
IPullToRefreshgetRefreshableView in interface IPullToRefresh<T extends android.view.View>public final boolean getShowViewWhileRefreshing()
IPullToRefreshgetShowViewWhileRefreshing in interface IPullToRefresh<T extends android.view.View>public final PullToRefreshBase.State getState()
getState in interface IPullToRefresh<T extends android.view.View>public final boolean isDisableScrollingWhileRefreshing()
isScrollingWhileRefreshingEnabled().public final boolean isPullToRefreshEnabled()
IPullToRefreshisPullToRefreshEnabled in interface IPullToRefresh<T extends android.view.View>public final boolean isPullToRefreshOverScrollEnabled()
IPullToRefreshisPullToRefreshOverScrollEnabled in interface IPullToRefresh<T extends android.view.View>public final boolean isRefreshing()
IPullToRefreshisRefreshing in interface IPullToRefresh<T extends android.view.View>public final boolean isScrollingWhileRefreshingEnabled()
IPullToRefreshisScrollingWhileRefreshingEnabled in interface IPullToRefresh<T extends android.view.View>public final boolean onInterceptTouchEvent(android.view.MotionEvent event)
onInterceptTouchEvent in class android.view.ViewGrouppublic final void onRefreshComplete()
IPullToRefreshonRefreshComplete in interface IPullToRefresh<T extends android.view.View>public final boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic final void setScrollingWhileRefreshingEnabled(boolean allowScrollingWhileRefreshing)
IPullToRefreshsetScrollingWhileRefreshingEnabled in interface IPullToRefresh<T extends android.view.View>allowScrollingWhileRefreshing - - true if you want to enable
scrolling while refreshingpublic void setDisableScrollingWhileRefreshing(boolean disableScrollingWhileRefreshing)
setScrollingWhileRefreshingEnabled(boolean)public final void setFilterTouchEvents(boolean filterEvents)
IPullToRefreshsetFilterTouchEvents in interface IPullToRefresh<T extends android.view.View>filterEvents - - true if you want to filter Touch Events. Default is
true.public void setLastUpdatedLabel(java.lang.CharSequence label)
getLoadingLayoutProxy().public void setLoadingDrawable(android.graphics.drawable.Drawable drawable)
getLoadingLayoutProxy().public void setLoadingDrawable(android.graphics.drawable.Drawable drawable,
PullToRefreshBase.Mode mode)
getLoadingLayoutProxy(boolean, boolean).public void setLongClickable(boolean longClickable)
setLongClickable in class android.view.Viewpublic final void setMode(PullToRefreshBase.Mode mode)
IPullToRefreshsetMode in interface IPullToRefresh<T extends android.view.View>mode - - Mode to set the View topublic void setOnPullEventListener(PullToRefreshBase.OnPullEventListener<T> listener)
IPullToRefreshsetOnPullEventListener in interface IPullToRefresh<T extends android.view.View>listener - - Listener to be used when the Widget has a pull event to
propogate.public final void setOnRefreshListener(PullToRefreshBase.OnRefreshListener<T> listener)
IPullToRefreshsetOnRefreshListener in interface IPullToRefresh<T extends android.view.View>listener - - Listener to be used when the Widget is set to Refreshpublic final void setOnRefreshListener(PullToRefreshBase.OnRefreshListener2<T> listener)
IPullToRefreshsetOnRefreshListener in interface IPullToRefresh<T extends android.view.View>listener - - Listener to be used when the Widget is set to Refreshpublic void setPullLabel(java.lang.CharSequence pullLabel)
getLoadingLayoutProxy().public void setPullLabel(java.lang.CharSequence pullLabel,
PullToRefreshBase.Mode mode)
getLoadingLayoutProxy(boolean, boolean).public final void setPullToRefreshEnabled(boolean enable)
enable - Whether Pull-To-Refresh should be usedpublic final void setPullToRefreshOverScrollEnabled(boolean enabled)
IPullToRefreshsetPullToRefreshOverScrollEnabled in interface IPullToRefresh<T extends android.view.View>enabled - - true if you want Overscroll enabledpublic final void setRefreshing()
IPullToRefreshsetRefreshing in interface IPullToRefresh<T extends android.view.View>public final void setRefreshing(boolean doScroll)
IPullToRefreshsetRefreshing in interface IPullToRefresh<T extends android.view.View>doScroll - - true if you want to force a scroll to the Refreshing
view.public void setRefreshingLabel(java.lang.CharSequence refreshingLabel)
getLoadingLayoutProxy().public void setRefreshingLabel(java.lang.CharSequence refreshingLabel,
PullToRefreshBase.Mode mode)
getLoadingLayoutProxy(boolean, boolean).public void setReleaseLabel(java.lang.CharSequence releaseLabel)
getLoadingLayoutProxy().public void setReleaseLabel(java.lang.CharSequence releaseLabel,
PullToRefreshBase.Mode mode)
getLoadingLayoutProxy(boolean, boolean).public void setScrollAnimationInterpolator(android.view.animation.Interpolator interpolator)
IPullToRefreshsetScrollAnimationInterpolator in interface IPullToRefresh<T extends android.view.View>interpolator - - Interpolator to usepublic final void setShowViewWhileRefreshing(boolean showView)
IPullToRefreshsetShowViewWhileRefreshing in interface IPullToRefresh<T extends android.view.View>public abstract PullToRefreshBase.Orientation getPullToRefreshScrollDirection()
PullToRefreshBase.Orientation.VERTICAL or
PullToRefreshBase.Orientation.HORIZONTAL depending on the scroll direction.protected final void addViewInternal(android.view.View child,
int index,
android.view.ViewGroup.LayoutParams params)
protected final void addViewInternal(android.view.View child,
android.view.ViewGroup.LayoutParams params)
protected LoadingLayout createLoadingLayout(android.content.Context context, PullToRefreshBase.Mode mode, android.content.res.TypedArray attrs)
protected LoadingLayoutProxy createLoadingLayoutProxy(boolean includeStart, boolean includeEnd)
getLoadingLayoutProxy(boolean, boolean).
Allows derivative classes to include any extra LoadingLayouts.protected abstract T createRefreshableView(android.content.Context context, android.util.AttributeSet attrs)
context - Context to create view withattrs - AttributeSet from wrapped class. Means that anything you
include in the XML layout declaration will be routed to the
created Viewprotected final void disableLoadingLayoutVisibilityChanges()
protected final LoadingLayout getFooterLayout()
protected final int getFooterSize()
protected final LoadingLayout getHeaderLayout()
protected final int getHeaderSize()
protected int getPullToRefreshScrollDuration()
protected int getPullToRefreshScrollDurationLonger()
protected android.widget.FrameLayout getRefreshableViewWrapper()
protected void handleStyledAttributes(android.content.res.TypedArray a)
a - - TypedArray of PullToRefresh Attributesprotected abstract boolean isReadyForPullEnd()
protected abstract boolean isReadyForPullStart()
protected void onPtrRestoreInstanceState(android.os.Bundle savedInstanceState)
onRestoreInstanceState(Parcelable) so that derivative
classes can handle their saved instance state.savedInstanceState - - Bundle which contains saved instance state.protected void onPtrSaveInstanceState(android.os.Bundle saveState)
onSaveInstanceState() so that derivative classes can
save their instance state.saveState - - Bundle to be updated with saved state.protected void onPullToRefresh()
PullToRefreshBase.State.PULL_TO_REFRESH state.protected void onRefreshing(boolean doScroll)
PullToRefreshBase.State.REFRESHING or PullToRefreshBase.State.MANUAL_REFRESHING state.doScroll - - Whether the UI should scroll for this event.protected void onReleaseToRefresh()
PullToRefreshBase.State.RELEASE_TO_REFRESH state.protected void onReset()
PullToRefreshBase.State.RESET state.protected final void onRestoreInstanceState(android.os.Parcelable state)
onRestoreInstanceState in class android.view.Viewprotected final android.os.Parcelable onSaveInstanceState()
onSaveInstanceState in class android.view.Viewprotected final void onSizeChanged(int w,
int h,
int oldw,
int oldh)
onSizeChanged in class android.view.Viewprotected final void refreshLoadingViewsSize()
protected final void refreshRefreshableViewSize(int width,
int height)
protected final void setHeaderScroll(int value)
value - - New Scroll valueprotected final void smoothScrollTo(int scrollValue)
scrollValue - - Position to scroll toprotected final void smoothScrollTo(int scrollValue,
com.handmark.pulltorefresh.library.PullToRefreshBase.OnSmoothScrollFinishedListener listener)
scrollValue - - Position to scroll tolistener - - Listener for scrollprotected final void smoothScrollToLonger(int scrollValue)
scrollValue - - Position to scroll toprotected void updateUIForMode()