public class SlideUp
extends java.lang.Object
implements android.view.View.OnTouchListener, android.animation.ValueAnimator.AnimatorUpdateListener, android.animation.Animator.AnimatorListener
| Modifier and Type | Class and Description |
|---|---|
static interface |
SlideUp.Listener
Interface to listen to all handled events taking place in the slider
|
static class |
SlideUp.State
Available start states
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSlideListener(SlideUp.Listener listener)
Add Listener which will be used in combination with this SlideUp
|
float |
getAutoSlideDuration()
|
android.animation.TimeInterpolator |
getInterpolator()
Returns current interpolator
|
<T extends android.view.View> |
getSliderView()
Returns typed view which was used as slider
|
int |
getStartGravity()
Returns gravity which used in combination with this SlideUp
|
float |
getTouchableAreaDp()
Returns touchable area (in dp) for interaction
|
float |
getTouchableAreaPx()
Returns touchable area (in px) for interaction
|
void |
hide()
Hide view with animation
|
void |
hideImmediately()
Hide view without animation
|
void |
hideSoftInput()
Trying hide soft input from window
|
boolean |
isAnimationRunning()
Returns running status of animation
|
boolean |
isGesturesEnabled()
Returns current status of gestures
|
boolean |
isHideKeyboardWhenDisplayed()
Returns current behavior of soft input
|
boolean |
isLoggingEnabled()
Returns current status of debug logging
|
boolean |
isVisible()
Returns the visibility status for this view.
|
void |
notifyPercentChanged(float percent) |
void |
notifyVisibilityChanged(int visibility) |
void |
onAnimationCancel(android.animation.Animator animator) |
void |
onAnimationEnd(android.animation.Animator animator) |
void |
onAnimationRepeat(android.animation.Animator animator) |
void |
onAnimationStart(android.animation.Animator animator) |
void |
onAnimationUpdate(android.animation.ValueAnimator animation) |
void |
onSaveInstanceState(android.os.Bundle savedState)
Saving current parameters of SlideUp
|
boolean |
onTouch(android.view.View v,
android.view.MotionEvent event) |
void |
removeSlideListener(SlideUp.Listener listener)
Remove Listener which was used in combination with this SlideUp
|
void |
setAutoSlideDuration(int autoSlideDuration)
|
void |
setGesturesEnabled(boolean enabled)
Turning on/off gestures
|
void |
setHideKeyboardWhenDisplayed(boolean hide)
Sets behavior of soft input
|
void |
setInterpolator(android.animation.TimeInterpolator interpolator)
|
void |
setLoggingEnabled(boolean enabled)
Turning on/off debug logging
|
void |
setTouchableAreaDp(float touchableArea)
Set touchable area (in dp) for interaction
|
void |
setTouchableAreaPx(float touchableArea)
Set touchable area (in px) for interaction
|
void |
show()
Show view with animation
|
void |
showImmediately()
Show view without animation
|
void |
showSoftInput()
Trying show soft input to window
|
void |
toggle()
Toggle current state with animation
|
void |
toggleImmediately()
Toggle current state without animation
|
public void hideSoftInput()
Trying hide soft input from window
InputMethodManager.hideSoftInputFromWindow(IBinder, int)public void showSoftInput()
Trying show soft input to window
InputMethodManager.showSoftInput(View, int)public boolean isVisible()
Returns the visibility status for this view.
View.VISIBLEpublic void addSlideListener(@NonNull
SlideUp.Listener listener)
Add Listener which will be used in combination with this SlideUp
public void removeSlideListener(@NonNull
SlideUp.Listener listener)
Remove Listener which was used in combination with this SlideUp
public <T extends android.view.View> T getSliderView()
Returns typed view which was used as slider
public void setAutoSlideDuration(int autoSlideDuration)
autoSlideDuration - (default - 300)public float getAutoSlideDuration()
public void setTouchableAreaDp(float touchableArea)
Set touchable area (in dp) for interaction
touchableArea - (default - 300dp)public void setTouchableAreaPx(float touchableArea)
Set touchable area (in px) for interaction
touchableArea - (default - 300dp)public float getTouchableAreaDp()
Returns touchable area (in dp) for interaction
public float getTouchableAreaPx()
Returns touchable area (in px) for interaction
public boolean isAnimationRunning()
Returns running status of animation
public void show()
Show view with animation
public void hide()
Hide view with animation
public void hideImmediately()
Hide view without animation
public void showImmediately()
Show view without animation
public void setLoggingEnabled(boolean enabled)
Turning on/off debug logging
enabled - (default - false)public boolean isLoggingEnabled()
Returns current status of debug logging
public void setGesturesEnabled(boolean enabled)
Turning on/off gestures
enabled - (default - true)public boolean isGesturesEnabled()
Returns current status of gestures
public android.animation.TimeInterpolator getInterpolator()
Returns current interpolator
public int getStartGravity()
Returns gravity which used in combination with this SlideUp
public void setInterpolator(android.animation.TimeInterpolator interpolator)
interpolator - (default - Decelerate interpolator)public boolean isHideKeyboardWhenDisplayed()
Returns current behavior of soft input
public void setHideKeyboardWhenDisplayed(boolean hide)
Sets behavior of soft input
hide - (default - false)public void toggle()
Toggle current state with animation
public void toggleImmediately()
Toggle current state without animation
public void onSaveInstanceState(@NonNull
android.os.Bundle savedState)
Saving current parameters of SlideUp
public final boolean onTouch(android.view.View v,
android.view.MotionEvent event)
onTouch in interface android.view.View.OnTouchListenerpublic final void onAnimationUpdate(android.animation.ValueAnimator animation)
onAnimationUpdate in interface android.animation.ValueAnimator.AnimatorUpdateListenerpublic void notifyPercentChanged(float percent)
public void notifyVisibilityChanged(int visibility)
public final void onAnimationStart(android.animation.Animator animator)
onAnimationStart in interface android.animation.Animator.AnimatorListenerpublic final void onAnimationEnd(android.animation.Animator animator)
onAnimationEnd in interface android.animation.Animator.AnimatorListenerpublic final void onAnimationCancel(android.animation.Animator animator)
onAnimationCancel in interface android.animation.Animator.AnimatorListenerpublic final void onAnimationRepeat(android.animation.Animator animator)
onAnimationRepeat in interface android.animation.Animator.AnimatorListener