List of usage examples for android.view.animation AccelerateInterpolator AccelerateInterpolator
public AccelerateInterpolator(float factor)
From source file:com.yacorso.nowaste.views.fragments.FoodListFragment.java
private void hideViews() { CoordinatorLayout.LayoutParams lp = (CoordinatorLayout.LayoutParams) mFabButton.getLayoutParams(); int fabBottomMargin = lp.bottomMargin; mFabButton.animate().translationY(mFabButton.getHeight() + fabBottomMargin) .setInterpolator(new AccelerateInterpolator(2)).start(); }
From source file:io.dwak.holohackernews.app.widget.SmoothSwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context/*from w ww . j av a 2s.com*/ * @param attrs */ public SmoothSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:social.laika.app.utils.views.ProgressBarSwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * * @param context//from w w w . j a v a2 s .c o m * @param attrs */ public ProgressBarSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.janseon.helper.refresh.SwipeRefreshLayoutSrc.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * //from ww w .jav a 2 s . c o m * @param context * @param attrs */ public SwipeRefreshLayoutSrc(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.ifeve.ifeveforandroid.view.MySwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * * @param context//from www. ja v a 2s. c o m * @param attrs */ public MySwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); this.setEnabled(false); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.seandroid.googlepullrefresh.widget.MySwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context//from w ww .j a v a2 s. c om * @param attrs */ public MySwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:cn.bvin.app.swiperefresh.OldSwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * * @param context//from ww w. j av a 2s. c o m * @param attrs */ public OldSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.klinker.android.launcher.info_page.widgets.swipe_refresh_layout.OffsetSwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context/*from ww w . j a va 2 s .co m*/ * @param attrs */ public OffsetSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.fruitmill.grapes.utils.CustomSwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context//from ww w. jav a 2 s . c o m * @param attrs */ public CustomSwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }
From source file:com.example.expand.test.testfeature.view.SwipeRefreshLayout.java
/** * Constructor that is called when inflating SwipeRefreshLayout from XML. * @param context/* w w w . j a v a 2 s . c o m*/ * @param attrs */ public SwipeRefreshLayout(Context context, AttributeSet attrs) { super(context, attrs); mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mMediumAnimationDuration = getResources().getInteger(android.R.integer.config_mediumAnimTime); setWillNotDraw(false); // mProgressBar = new SwipeProgressBar(this); final DisplayMetrics metrics = getResources().getDisplayMetrics(); mProgressBarHeight = (int) (metrics.density * PROGRESS_BAR_HEIGHT); mDecelerateInterpolator = new DecelerateInterpolator(DECELERATE_INTERPOLATION_FACTOR); mAccelerateInterpolator = new AccelerateInterpolator(ACCELERATE_INTERPOLATION_FACTOR); final TypedArray a = context.obtainStyledAttributes(attrs, LAYOUT_ATTRS); setEnabled(a.getBoolean(0, true)); a.recycle(); }