Java Code Examples for android.view.animation.Interpolator

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project android_packages_apps_Gallery2, under directory /src/com/android/gallery3d/anim/.

Source file: Animation.java

  22 
vote

public boolean calculate(long currentTimeMillis){
  if (mStartTime == NO_ANIMATION)   return false;
  if (mStartTime == ANIMATION_START)   mStartTime=currentTimeMillis;
  int elapse=(int)(currentTimeMillis - mStartTime);
  float x=Utils.clamp((float)elapse / mDuration,0f,1f);
  Interpolator i=mInterpolator;
  onCalculate(i != null ? i.getInterpolation(x) : x);
  if (elapse >= mDuration)   mStartTime=NO_ANIMATION;
  return mStartTime != NO_ANIMATION;
}
 

Example 2

From project platform_packages_apps_Gallery2_1, under directory /src/com/android/gallery3d/anim/.

Source file: Animation.java

  22 
vote

public boolean calculate(long currentTimeMillis){
  if (mStartTime == NO_ANIMATION)   return false;
  if (mStartTime == ANIMATION_START)   mStartTime=currentTimeMillis;
  int elapse=(int)(currentTimeMillis - mStartTime);
  float x=Utils.clamp((float)elapse / mDuration,0f,1f);
  Interpolator i=mInterpolator;
  onCalculate(i != null ? i.getInterpolation(x) : x);
  if (elapse >= mDuration)   mStartTime=NO_ANIMATION;
  return mStartTime != NO_ANIMATION;
}
 

Example 3

From project android-pulltorefresh, under directory /library/src/com/handmark/pulltorefresh/library/internal/.

Source file: IndicatorLayout.java

  21 
vote

public IndicatorLayout(Context context,PullToRefreshBase.Mode mode){
  super(context);
  mArrowImageView=new ImageView(context);
  final int padding=getResources().getDimensionPixelSize(R.dimen.indicator_internal_padding);
  mArrowImageView.setPadding(padding,padding,padding,padding);
  addView(mArrowImageView);
  int inAnimResId, outAnimResId;
switch (mode) {
case PULL_UP_TO_REFRESH:
    inAnimResId=R.anim.slide_in_from_bottom;
  outAnimResId=R.anim.slide_out_to_bottom;
setBackgroundResource(R.drawable.indicator_bg_bottom);
mArrowImageView.setImageResource(R.drawable.arrow_up);
break;
default :
case PULL_DOWN_TO_REFRESH:
inAnimResId=R.anim.slide_in_from_top;
outAnimResId=R.anim.slide_out_to_top;
setBackgroundResource(R.drawable.indicator_bg_top);
mArrowImageView.setImageResource(R.drawable.arrow_down);
break;
}
mInAnim=AnimationUtils.loadAnimation(context,inAnimResId);
mInAnim.setAnimationListener(this);
mOutAnim=AnimationUtils.loadAnimation(context,outAnimResId);
mOutAnim.setAnimationListener(this);
final Interpolator interpolator=new LinearInterpolator();
mRotateAnimation=new RotateAnimation(0,-180,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
mRotateAnimation.setInterpolator(interpolator);
mRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
mRotateAnimation.setFillAfter(true);
mResetRotateAnimation=new RotateAnimation(-180,0,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
mResetRotateAnimation.setInterpolator(interpolator);
mResetRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
mResetRotateAnimation.setFillAfter(true);
}
 

Example 4

From project friendica-for-android, under directory /libpulltorefresh/src/com/handmark/pulltorefresh/library/internal/.

Source file: IndicatorLayout.java

  21 
vote

public IndicatorLayout(Context context,PullToRefreshBase.Mode mode){
  super(context);
  mArrowImageView=new ImageView(context);
  FrameLayout.LayoutParams lp=new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,FrameLayout.LayoutParams.WRAP_CONTENT,Gravity.CENTER);
  lp.topMargin=lp.bottomMargin=lp.leftMargin=lp.rightMargin=getResources().getDimensionPixelSize(R.dimen.indicator_internal_padding);
  addView(mArrowImageView,lp);
  int inAnimResId, outAnimResId;
switch (mode) {
case PULL_UP_TO_REFRESH:
    inAnimResId=R.anim.slide_in_from_bottom;
  outAnimResId=R.anim.slide_out_to_bottom;
setBackgroundResource(R.drawable.indicator_bg_bottom);
mArrowImageView.setImageResource(R.drawable.arrow_up);
break;
default :
case PULL_DOWN_TO_REFRESH:
inAnimResId=R.anim.slide_in_from_top;
outAnimResId=R.anim.slide_out_to_top;
setBackgroundResource(R.drawable.indicator_bg_top);
mArrowImageView.setImageResource(R.drawable.arrow_down);
break;
}
mInAnim=AnimationUtils.loadAnimation(context,inAnimResId);
mInAnim.setAnimationListener(this);
mOutAnim=AnimationUtils.loadAnimation(context,outAnimResId);
mOutAnim.setAnimationListener(this);
final Interpolator interpolator=new LinearInterpolator();
mRotateAnimation=new RotateAnimation(0,-180,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
mRotateAnimation.setInterpolator(interpolator);
mRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
mRotateAnimation.setFillAfter(true);
mResetRotateAnimation=new RotateAnimation(-180,0,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
mResetRotateAnimation.setInterpolator(interpolator);
mResetRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
mResetRotateAnimation.setFillAfter(true);
}
 

Example 5

From project UDJ-Android-Client, under directory /src/org/klnusbaum/udj/PullToRefresh/.

Source file: LoadingLayout.java

  21 
vote

public LoadingLayout(Context context,final int mode,String releaseLabel,String pullLabel,String refreshingLabel,TypedArray attrs){
  super(context);
  ViewGroup header=(ViewGroup)LayoutInflater.from(context).inflate(R.layout.pull_to_refresh_header,this);
  mHeaderText=(TextView)header.findViewById(R.id.pull_to_refresh_text);
  mHeaderImage=(ImageView)header.findViewById(R.id.pull_to_refresh_image);
  mHeaderProgress=(ProgressBar)header.findViewById(R.id.pull_to_refresh_progress);
  final Interpolator interpolator=new LinearInterpolator();
  mRotateAnimation=new RotateAnimation(0,-180,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  mRotateAnimation.setInterpolator(interpolator);
  mRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
  mRotateAnimation.setFillAfter(true);
  mResetRotateAnimation=new RotateAnimation(-180,0,Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,0.5f);
  mResetRotateAnimation.setInterpolator(interpolator);
  mResetRotateAnimation.setDuration(DEFAULT_ROTATION_ANIMATION_DURATION);
  mResetRotateAnimation.setFillAfter(true);
  mReleaseLabel=releaseLabel;
  mPullLabel=pullLabel;
  mRefreshingLabel=refreshingLabel;
switch (mode) {
case PullToRefreshBase.MODE_PULL_UP_TO_REFRESH:
    mHeaderImage.setImageResource(R.drawable.pulltorefresh_up_arrow);
  break;
case PullToRefreshBase.MODE_PULL_DOWN_TO_REFRESH:
default :
mHeaderImage.setImageResource(R.drawable.pulltorefresh_down_arrow);
break;
}
if (attrs.hasValue(R.styleable.PullToRefresh_ptrHeaderTextColor)) {
final int color=attrs.getColor(R.styleable.PullToRefresh_ptrHeaderTextColor,Color.BLACK);
setTextColor(color);
}
}
 

Example 6

From project Alerte-voirie-android, under directory /src/net/londatiga/android/.

Source file: QuickAction.java

  20 
vote

/** 
 * Constructor
 * @param anchor  {@link View} on where the popup should be displayed
 */
public QuickAction(View anchor){
  super(anchor);
  actionList=new ArrayList<ActionItem>();
  context=anchor.getContext();
  inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  root=(ViewGroup)inflater.inflate(R.layout.quickaction,null);
  mArrowDown=(ImageView)root.findViewById(R.id.arrow_down);
  mArrowUp=(ImageView)root.findViewById(R.id.arrow_up);
  setContentView(root);
  mTrackAnim=AnimationUtils.loadAnimation(anchor.getContext(),R.anim.rail);
  mTrackAnim.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  mTrack=(ViewGroup)root.findViewById(R.id.tracks);
  animStyle=ANIM_AUTO;
  animateTrack=true;
}
 

Example 7

From project android-joedayz, under directory /Proyectos/GreenDroid/src/greendroid/widget/.

Source file: QuickActionBar.java

  20 
vote

public QuickActionBar(Context context){
  super(context);
  mRackAnimation=AnimationUtils.loadAnimation(context,R.anim.gd_rack);
  mRackAnimation.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  setContentView(R.layout.gd_quick_action_bar);
  final View v=getContentView();
  mRack=(ViewGroup)v.findViewById(R.id.gdi_rack);
  mQuickActionItems=(ViewGroup)v.findViewById(R.id.gdi_quick_action_items);
  mScrollView=(HorizontalScrollView)v.findViewById(R.id.gdi_scroll);
}
 

Example 8

From project blokish, under directory /src/org/scoutant/blokish/.

Source file: BusyIndicator.java

  20 
vote

public BusyIndicator(Context ctx,View view){
  this.view=view;
  view.setVisibility(View.INVISIBLE);
  uiHandler=new Handler();
  this.drawable=ctx.getResources().getDrawable(R.drawable.spinner_blue_76);
  animation=new RotateAnimation(0,360,RotateAnimation.RELATIVE_TO_SELF,0.5f,RotateAnimation.RELATIVE_TO_SELF,0.5f);
  animation.setRepeatCount(Animation.INFINITE);
  final int cycles=12;
  animation.setInterpolator(new Interpolator(){
    public float getInterpolation(    float input){
      return ((int)(input * cycles)) / (float)cycles;
    }
  }
);
  animation.setDuration(1800);
  animation.setStartTime(RotateAnimation.START_ON_FIRST_FRAME);
  animation.setStartOffset(0);
}
 

Example 9

From project CineShowTime-Android, under directory /Libraries/GreenDroid/src/greendroid/widget/.

Source file: QuickActionBar.java

  20 
vote

public QuickActionBar(Context context){
  super(context);
  mRackAnimation=AnimationUtils.loadAnimation(context,R.anim.gd_rack);
  mRackAnimation.setInterpolator(new Interpolator(){
    @Override public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  setContentView(R.layout.gd_quick_action_bar);
  final View v=getContentView();
  mRack=(ViewGroup)v.findViewById(R.id.gdi_rack);
  mQuickActionItems=(ViewGroup)v.findViewById(R.id.gdi_quick_action_items);
  mScrollView=(HorizontalScrollView)v.findViewById(R.id.gdi_scroll);
}
 

Example 10

From project dungbeetle, under directory /src/edu/stanford/mobisocial/dungbeetle/.

Source file: QuickAction.java

  20 
vote

/** 
 * Constructor
 * @param anchor  {@link View} on where the popup should be displayed
 */
public QuickAction(View anchor){
  super(anchor);
  actionList=new ArrayList<ActionItem>();
  context=anchor.getContext();
  inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  root=(ViewGroup)inflater.inflate(R.layout.quickaction,null);
  mArrowDown=(ImageView)root.findViewById(R.id.arrow_down);
  mArrowUp=(ImageView)root.findViewById(R.id.arrow_up);
  setContentView(root);
  mTrackAnim=AnimationUtils.loadAnimation(anchor.getContext(),R.anim.rail);
  mTrackAnim.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  mTrack=(ViewGroup)root.findViewById(R.id.tracks);
  animStyle=ANIM_AUTO;
  animateTrack=true;
}
 

Example 11

From project Ebento, under directory /src/mobisocial/bento/ebento/ui/quickaction/.

Source file: QuickAction.java

  20 
vote

/** 
 * Constructor.
 * @param context Context
 */
public QuickAction(Context context){
  super(context);
  inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  mTrackAnim=AnimationUtils.loadAnimation(context,R.anim.rail);
  mTrackAnim.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  setRootViewId(R.layout.quickaction);
  mAnimStyle=ANIM_AUTO;
  mAnimateTrack=true;
  mChildPos=0;
}
 

Example 12

From project GreenDroid, under directory /GreenDroid/src/greendroid/widget/.

Source file: QuickActionBar.java

  20 
vote

public QuickActionBar(Context context){
  super(context);
  mRackAnimation=AnimationUtils.loadAnimation(context,R.anim.gd_rack);
  mRackAnimation.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  setContentView(R.layout.gd_quick_action_bar);
  final View v=getContentView();
  mRack=(ViewGroup)v.findViewById(R.id.gdi_rack);
  mQuickActionItems=(ViewGroup)v.findViewById(R.id.gdi_quick_action_items);
  mScrollView=(HorizontalScrollView)v.findViewById(R.id.gdi_scroll);
}
 

Example 13

From project GreenDroidQABar, under directory /src/greendroid/widget/.

Source file: QuickActionBar.java

  20 
vote

public QuickActionBar(Context context){
  super(context);
  mRackAnimation=AnimationUtils.loadAnimation(context,R.anim.gd_rack);
  mRackAnimation.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
  setContentView(R.layout.gd_quick_action_bar);
  final View v=getContentView();
  mRack=(ViewGroup)v.findViewById(R.id.gdi_rack);
  mQuickActionItems=(ViewGroup)v.findViewById(R.id.gdi_quick_action_items);
  mScrollView=(HorizontalScrollView)v.findViewById(R.id.gdi_scroll);
}
 

Example 14

From project RebeLauncher, under directory /src/com/devoteam/quickaction/.

Source file: QuickActionWindow.java

  20 
vote

/** 
 * Creates a new Instance of the QuickActionWindow
 * @param context Context to use, usually your Appication or your Activity
 * @param pView The view you want to anchor the window on (the parent)
 * @param rect Rectangle defining the view area
 */
public QuickActionWindow(Context context,View pView,Rect rect){
  super(context);
  mPView=pView;
  mAnchor=rect;
  mContext=context;
  mWindowManager=(WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE);
  mInflater=((Activity)mContext).getLayoutInflater();
  contentView=mInflater.inflate(R.layout.quickaction,null);
  super.setContentView(contentView);
  mScreenWidth=mWindowManager.getDefaultDisplay().getWidth();
  setWindowLayoutMode(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);
  final Resources res=mContext.getResources();
  mShadowHoriz=res.getDimensionPixelSize(R.dimen.quickaction_shadow_horiz);
  setWidth(mScreenWidth + mShadowHoriz + mShadowHoriz);
  setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
  setBackgroundDrawable(new ColorDrawable(0));
  mArrowUp=(ImageView)contentView.findViewById(R.id.arrow_up);
  mArrowDown=(ImageView)contentView.findViewById(R.id.arrow_down);
  mTrack=(ViewGroup)contentView.findViewById(R.id.quickaction);
  setFocusable(true);
  setTouchable(true);
  setOutsideTouchable(true);
  mTrackAnim=AnimationUtils.loadAnimation(mContext,R.anim.quickaction);
  mTrackAnim.setInterpolator(new Interpolator(){
    public float getInterpolation(    float t){
      final float inner=(t * 1.55f) - 1.1f;
      return 1.2f - inner * inner;
    }
  }
);
}
 

Example 15

From project 2Degrees-Toolbox, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 16

From project 4308Cirrus, under directory /Extras/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 17

From project ActionBarSherlock, under directory /library/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 18

From project Amantech, under directory /Android/action_bar_sherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 19

From project andlytics, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 20

From project androidZenWriter, under directory /library/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 21

From project Common-Sense-Net-2, under directory /AndroidBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 22

From project cow, under directory /libs/ActionBarSherlock/library/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 23

From project cw-omnibus, under directory /external/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 24

From project DeskSMS, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 25

From project dmix, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 26

From project dreamDroid, under directory /libraries/ABS/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 27

From project droidkit, under directory /src/org/droidkit/widget/.

Source file: Scroller.java

  19 
vote

/** 
 * Create a Scroller with the specified interpolator. If the interpolator is null, the default (viscous) interpolator will be used.
 */
public Scroller(Context context,Interpolator interpolator){
  mFinished=true;
  mInterpolator=interpolator;
  float ppi=context.getResources().getDisplayMetrics().density * 160.0f;
  mDeceleration=SensorManager.GRAVITY_EARTH * 39.37f * ppi* ViewConfiguration.getScrollFriction();
}
 

Example 28

From project examples_2, under directory /SearchView/actionbarsherlock-lib/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 29

From project farebot, under directory /libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 30

From project finch, under directory /libs/JakeWharton-ActionBarSherlock-2eabf25/library/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 31

From project GnucashMobile, under directory /com_actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 32

From project Google-Tasks-Client, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 33

From project HeLauncher, under directory /src/org/adw/launcher/.

Source file: CustomScroller.java

  19 
vote

/** 
 * Create a CustomScroller with the specified interpolator. If the interpolator is null, the default (viscous) interpolator will be used.
 */
public CustomScroller(Context context,Interpolator interpolator){
  mFinished=true;
  mInterpolator=interpolator;
  float ppi=context.getResources().getDisplayMetrics().density * 160.0f;
  mDeceleration=SensorManager.GRAVITY_EARTH * 39.37f * ppi* ViewConfiguration.getScrollFriction();
}
 

Example 34

From project HSR-Timetable, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 35

From project iosched_3, under directory /libprojects/abs/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 36

From project IRC-Client, under directory /actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 37

From project MensaUPB, under directory /libs/ActionbarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 38

From project mWater-Android-App, under directory /android/actionbarsherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 39

From project MyHeath-Android, under directory /actionbarlib/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 40

From project NineOldAndroids, under directory /library/src/com/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 41

From project onebusaway-android, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 42

From project open311-android, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 43

From project path_scroller, under directory /src/com/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 44

From project Schedule, under directory /libs/android/sherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 45

From project SeriesGuide, under directory /ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 46

From project SMSSync, under directory /abslib/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 47

From project Something-Awful-Android, under directory /libraries/Sherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 48

From project The-Reverse-Recipe-Book, under directory /actionbarsherlock4.0/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 49

From project Unibeer, under directory /libs/sherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 50

From project Wifileaks, under directory /WifiLeaks/ABS/library/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 51

From project XTrade, under directory /sherlock-bar/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}
 

Example 52

From project Yaaic, under directory /libs/ActionBarSherlock/src/com/actionbarsherlock/internal/nineoldandroids/animation/.

Source file: ValueAnimator.java

  19 
vote

/** 
 * The time interpolator used in calculating the elapsed fraction of this animation. The interpolator determines whether the animation runs with linear or non-linear motion, such as acceleration and deceleration. The default value is {@link android.view.animation.AccelerateDecelerateInterpolator}
 * @param value the interpolator to be used by this animation. A value of <code>null</code>will result in linear interpolation.
 */
@Override public void setInterpolator(Interpolator value){
  if (value != null) {
    mInterpolator=value;
  }
 else {
    mInterpolator=new LinearInterpolator();
  }
}