Questions tagged [translate-animation]

To translate means to change the position of an object so that it gets moved from one place to another in the world (e.g. a person walking on a sidewalk). Translation is not to be confused with rotation, which is about changing the direction an object is "facing" in the world.

407 questions
7
votes
1 answer

How can I rotate around the center of a group in Three.js

I've created a group of cubes and I'm trying to figure out how to set the center so I can rotate them. Here is the fiddle: https://jsfiddle.net/of1vfhzz/ Here I add the cubes: side1 = new THREE.Object3D(); addCube({ name: 'side1topleft', x: -8.5, y:…
Bryan Dellinger
  • 4,724
  • 7
  • 33
  • 79
7
votes
1 answer

Translate a View from One Layout to Another with Translate Animation

I am new in Android animation and my requirement is to translate a view from one layout to layout in a single xml file on click of that view. Scenario: Suppose I click a button, present on the top of the header in a xml file,and it should…
samsad
  • 1,241
  • 1
  • 10
  • 15
7
votes
1 answer

Smooth floating animation using translation in XML

I'm developing a game for Android in Eclipse and I'm trying to get an image to smoothly translate up and down to look like it's floating up and down infinitely. As is, it translates smoothly, but looks choppy in the transition from going down to…
JD797
  • 271
  • 1
  • 2
  • 8
7
votes
3 answers

Move ImageView from its current position to fixed position using translate animation

I want to move my image view from its current position to some fixed position on screen using translate animation. Also I want to know how translate animation works and what parameters it accepts exactly? My piece of code is... …
Nikhil Sathawara
  • 161
  • 1
  • 2
  • 8
7
votes
4 answers

Using Matrix. Rotate in OpenGL ES 2.0

Edit - Added more code Having a lot of problems attempting to correctly rotate my quad using OpenGL ES 2.0. It always seems to rotate around the centre of the screen co-ordinates. I'm trying to get it to rotate around it's own centre (for 2d, so z…
Zippy
  • 3,826
  • 5
  • 43
  • 96
7
votes
2 answers

Start two animation in the same Layout

Im trying to do an alpha and translate in a RelativeLayout. I define both: AlphaAnimation alpha; alpha = new AlphaAnimation(0.0f, 1.0f); alpha.setDuration(1500); alpha.setFillAfter(true); TranslateAnimation translate; translate = new…
Georgevik
  • 539
  • 1
  • 5
  • 18
7
votes
3 answers

Error setBackground View after animation

I create a CustomView extends View. Create some CustomView and using animation to move and rotate them. After change backgroundResource and error happened, new background not fill all CustomView. Please see code: clearAnimation(); …
BaDo
  • 540
  • 8
  • 19
6
votes
1 answer

-webkit-transform how can I change rotate() while preserving translate3d()?

What I am looking to do is change the translate3d transform of an element while a css3 animation is running on the element. When I try to do this, however, it seems that the animation resets the transform every time right before updating the…
6
votes
1 answer

Translate animation from position Y to top of the screen

I have multiple views that are all selectable. When one of them gets selected I want my new view to be first positioned to the same location as the selected one and also move it to the top of my screen. How can I do that? The position of selected…
zbx
  • 279
  • 1
  • 3
  • 11
6
votes
2 answers

TranslateAnimation in reverse position?

I am working on app in which i used TranslateAnimation but i want to reverse TranslateAnimation to start position. protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub …
6
votes
2 answers

Animate a object across the width of its parent using css transforms

I'm trying to improve my animation performance using css transforms to translate the position of an element inside a 100% width wrapper. So it enters the screen from the lefthand side and exits on the right, before repeating the animation. I figured…
Matt
  • 806
  • 3
  • 12
  • 32
6
votes
0 answers

android translate ImageView over SurfaceView

I have two widgets, ImageView and SurfaceView. SurfaceView contains Camera preview. Sometimes I have to show Bitmap (i use ImageView to show this image) over SurfaceView. It's OK. But, i also have to translate this bitmap. When I start the…
5
votes
1 answer

Android Translate Animation

I have an ImageView that is 250dp above the bottom and with translate animation i want to move it to 50dp above the bottom. I know how to use a translate animation, but I don't know what would be the ToYValue field. The code wil be something like…
Victor
  • 193
  • 1
  • 2
  • 10
5
votes
1 answer

OnClickListener in TranslateAnimation

I am doing a project using TranslateAnimation in Android. In that I am translating images successfully but I have to add onClickListener to the images. That means I have click the images during translating and get their values but I am getting the…
surendra
  • 2,217
  • 7
  • 34
  • 42
5
votes
2 answers

Android slide down animation

I have a toolbar aligned at the bottom and a WebView above it, which fill remaining height. Now I want to slide down the toolbar in order to hide it, and while it's animating the webview height should expand. I've tried using TranslateAnimation but…
Sebastian Nowak
  • 5,607
  • 8
  • 67
  • 107
1
2
3
27 28