Best code examples for Android TranslateAnimation class (android.view.animation.TranslateAnimation)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android TranslateAnimation class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android TranslateAnimation examples from Open Source projects
This code example shows how to use the following methods: setAnimationListener, setDuration, setFillBefore, setFillEnabled, setInterpolator
145:	if (mExpanded) { 
-
149:	anim = new TranslateAnimation(0, -offset, 0, 0); 
150:	mFillOffset = -offset; 
151:	} 
152:	mExpanded = !mExpanded; 
153:	anim.setFillEnabled(true); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setInterpolator
55:	anim=new TranslateAnimation(0.0f, 0.0f, 0.0f, 
-
57:	anim.setAnimationListener(collapseListener); 
-
60:	anim.setDuration(speed); 
61:	anim.setInterpolator(new AccelerateInterpolator(1.0f)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
20:	Animation anim = new TranslateAnimation(0, 0, 30, 0); 
21:	Robolectric.shadowOf(anim).setLoadedFromResourceId(id); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
33:	Animation translate =  new TranslateAnimation(1f, 2f, 3f, 4f); 
-
42:	assertThat(list.get(1)).isSameAs(translate); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration
134:	TranslateAnimation anim=new TranslateAnimation(0, x, 0,y); 
135:	anim.setDuration(ANIM_DURATION); 
136:	anim.setAnimationListener(new AnimationListener() { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter
117:	Animation a = new TranslateAnimation(-dx, 0, -dy, 0); 
118:	a.setFillAfter(true); 
119:	a.setDuration(durationMillis); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setFillBefore, setFillEnabled, setInterpolator
145:	anim = new TranslateAnimation(0, -offset, 0, 0); 
-
149:	anim.setFillEnabled(true); 
150:	anim.setFillBefore(true); 
151:	anim.setDuration(300); 
152:	anim.setInterpolator(new AccelerateDecelerateInterpolator()); 
153:	anim.setAnimationListener(new AnimationFiller()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
51:	Animation inFromLeft = new TranslateAnimation( 
-
55:	inFromLeft.setDuration(DURATION); 
56:	inFromLeft.setInterpolator(new AccelerateInterpolator()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration
102:	inLeft   = new TranslateAnimation(mWidth, 0, 0, 0); 
103:	inLeft.setAnimationListener(this); 
-
109:	inLeft.setDuration(ANIM_DURATION); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener
60:	anim=new TranslateAnimation(0.0f, 0.0f, 0.0f, 
-
62:	anim.setAnimationListener(collapseListener); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
18:	Animation anim = new TranslateAnimation(0, 0, 30, 0); 
19:	Robolectric.shadowOf(anim).setLoadedFromResourceId(id); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter, setStartOffset
37:	TranslateAnimation move = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, sign * 0.70f, 
-
40:	move.setStartOffset(0); 
41:	move.setDuration(speed); 
42:	move.setFillAfter(true); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setInterpolator
453:	animation = new TranslateAnimation(fromXDelta, toXDelta, fromYDelta, toYDelta); 
454:	animation.setDuration(calculatedDuration); 
455:	animation.setAnimationListener(animationListener); 
-
457:	animation.setInterpolator(new LinearInterpolator()); 
-
460:	animation.setInterpolator(mInterpolator); 
-
462:	startAnimation(animation); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration
43:	animation = new TranslateAnimation( 
-
47:	animation.setDuration(100); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
18:	Animation inFromRight = new TranslateAnimation( 
-
22:	inFromRight.setDuration(DURATION); 
23:	inFromRight.setInterpolator(new AccelerateDecelerateInterpolator()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
124:	Animation animation = new TranslateAnimation(0, 200, 0, 200); 
125:	animation.setDuration(1000); 
126:	animation.setInterpolator(this, interpolator); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setFillBefore, setInterpolator
106:	Animation slide = new TranslateAnimation( 
-
110:	slide.setDuration(125); 
111:	slide.setFillBefore(true); 
112:	slide.setInterpolator(new AccelerateInterpolator()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration
13:	final TranslateAnimation toLeft = new TranslateAnimation(length, -length, 0, 0); 
-
16:	toLeft.setDuration(duration * 2); 
-
18:	toRight.setAnimationListener(new AnimationListener() { 
-
33:	toLeft.setAnimationListener(new AnimationListener() { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setDuration, setStartTime
309:	Animation a = new TranslateAnimation(-deltaX, 0, -deltaY, 0); 
310:	a.setStartTime(SystemClock.elapsedRealtime()); 
311:	a.setDuration(250); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter
117:	Animation a = new TranslateAnimation(-dx, 0, -dy, 0); 
118:	a.setFillAfter(true); 
119:	a.setDuration(durationMillis); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
280:	Animation outtoRight = new TranslateAnimation( 
-
286:	outtoRight.setDuration(350); 
287:	outtoRight.setInterpolator(new AccelerateInterpolator()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter, setInterpolator, setStartOffset
12:	Animation anim = new TranslateAnimation((float)w, 0, 0, 0); 
13:	anim.setDuration(t); 
14:	anim.setInterpolator( new DecelerateInterpolator((float)f) ); 
15:	anim.setFillAfter(true); 
16:	anim.setStartOffset(offset); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setFillAfter, setInterpolator
661:	trans1 = new TranslateAnimation(0, dx, 0, dy); 
662:	trans1.setDuration(ANIM_DURATION); 
663:	trans1.setInterpolator(new LinearInterpolator()); 
664:	trans1.setFillAfter(true); 
-
670:	trans1.setAnimationListener(new AnimationListener() { 
-
700:	slider.startAnimation(trans1, trans2); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter, setStartOffset
37:	TranslateAnimation move = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, sign * 0.70f, 
-
40:	move.setStartOffset(0); 
41:	move.setDuration(speed); 
42:	move.setFillAfter(true); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setInterpolator
179:	final TranslateAnimation translateanimation = new TranslateAnimation(2, 
-
181:	translateanimation.setDuration(500L); 
182:	translateanimation.setInterpolator(new OvershootInterpolator(1.0f)); 
183:	translateanimation.setAnimationListener(animationlistener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setInterpolator, setStartOffset
21:	Animation animation = new TranslateAnimation(fromX, toX, 0, 0); 
22:	animation.setStartOffset(50); 
23:	animation.setDuration(1000); 
24:	animation.setAnimationListener(new DeleteAnimationListener(position)); 
25:	animation.setInterpolator(AnimationUtils.loadInterpolator( 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator, setRepeatCount
76:	final TranslateAnimation anim = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0f, 
-
80:	anim.setDuration(500); 
81:	anim.setRepeatCount(0); 
82:	anim.setInterpolator(AnimationUtils.loadInterpolator(this, android.R.anim.accelerate_decelerate_interpolator)); 
-
85:	m_start_dialog.startAnimation(anim); 
86:	m_stop_dialog.startAnimation(anim); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
144:	new TranslateAnimation(Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, 
-
146:	animation.setDuration(ANIMATION_SPEED); 
147:	animation.setInterpolator(new AccelerateInterpolator()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setInterpolator
128:	Animation animation = new TranslateAnimation(0, 200, 0, 200); 
129:	animation.setDuration(1000); 
130:	animation.setInterpolator(this, interpolator); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setAnimationListener, setDuration, setFillAfter, setInterpolator
61:	TranslateAnimation localTranslateAnimation1 = new TranslateAnimation(0.0F, 0.0F, 0.0F, -this.e.getHeight()); 
62:	localTranslateAnimation1.setDuration(1000L); 
63:	localTranslateAnimation1.setFillAfter(true); 
64:	localTranslateAnimation1.setInterpolator(new AccelerateDecelerateInterpolator()); 
65:	localTranslateAnimation1.setAnimationListener(paramAnimationListener); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration, setFillAfter
240:	Animation trans = new TranslateAnimation(0, dx, 0, dy); 
241:	trans.setDuration(ANIM_DURATION); 
242:	trans.setFillAfter(true); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration
56:	final TranslateAnimation translate = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 
-
59:	translate.setDuration(duration); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: setDuration
34:	anim = new TranslateAnimation(rel, 0, rel, 0, rel, movingFrom, rel, movingTo); 
-
36:	anim.setDuration(duration); 
Full Snippet Info
6
CodeRank
Related Android TranslateAnimation Questions & Answers:
See Code Examples for Android TranslateAnimation Methods: