How can i move ImageView

All your problems with Audio, Video and Images.

How can i move ImageView

Postby pmskiran » Mon Aug 24, 2009 4:23 pm

Hi
Ands,


My problem is , i want to move any view how ever i want using animations(moving views using animation is possible for me..), but here problem is i want to keep the state of the view as it is after animation, but after animation the view go back to its original postion..

I want to maintain the state of the view after animation, is there any possibility please help me...

sorry for my english.
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Top

Postby sudheer1437 » Tue Aug 25, 2009 12:11 pm

HI kiran.
How r u animating the views...???
I want to use animation and exchange two images in two different image views.
Can u help me out.
plzz....

Thanks in advance...
sudheer1437
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Sat Aug 08, 2009 7:42 am
Location: India

Postby pmskiran » Tue Aug 25, 2009 12:37 pm

Hi sudheer,

We can move any view by using simple animation( like using scale animation,translate animation,rotateanimation)...

but i dont know how to restore the postion after animation....

here the snippet...

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. TranslateAnimation anim=new TranslateAnimation(10, 100, 10, 100);
  3.  
  4.         anim.setDuration(2000);
  5.  
  6.         imgview.setAnimation(anim);
  7.  
  8.         anim.start();
  9.  
  10.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


If u know how to restore the postion after the animation plz reply..

Cheers...
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Postby sudheer1437 » Tue Aug 25, 2009 3:39 pm

thanks dude...
i will try it out and let u know if any problems.

and i will tell u if i get the solution for ur problem also.,
sudheer1437
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Sat Aug 08, 2009 7:42 am
Location: India

Postby sudheer1437 » Wed Aug 26, 2009 5:57 am

Hi this is not solving my problem.
Actually i want to move a image in imageview to another imageview by touch event
sudheer1437
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Sat Aug 08, 2009 7:42 am
Location: India

Postby pmskiran » Wed Aug 26, 2009 6:12 am

Hi sudheer,

I am not sure but i think we cant animate only image without imageview because animation are

applied to only views.I dont know which layout ur using , for suppose if it is absolute u can change

the position of the imageview on onTouch event and finally in onTouch event/ActionUp just u hide

that view and assign the corresponding image to second imageView.

I hope this wil help u.

cheers....
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Top

Postby sudheer1437 » Thu Aug 27, 2009 6:00 am

Ya...
I did in the same way... But there r some problems...
Actually i am doing Jigsaw puzzle. I hope u know abt dis game.
We need to crop the image and shuffle. The game is again we need to rearrange the small images to form a big image.

I have succeeded in cutting the images and shuffling.
But i am unable to me. I used the same logic wad u said.

If u have any help.... plz help me out...
sudheer1437
Experienced Developer
Experienced Developer
 
Posts: 79
Joined: Sat Aug 08, 2009 7:42 am
Location: India

Postby pmskiran » Thu Aug 27, 2009 7:12 am

Hi sudheer1437,

Hey great...

I am also doing the sameone, its almost in final stage... if u want i wil send .apk

In my game i didn't use the view to show the croped pics, i developed totally on drawArea...

so i didn't get that prob..

Anyway nice to hear...
Cheers...
Kiran PMS
pmskiran
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jul 31, 2009 10:44 am
Location: India

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 8 guests