ViewGroup, Views and Animation

by mobilek...@googlemail.com » Sun, 15 Feb 2009 07:52:59 GMT


Sponsored Links
 Hi,
I have a few views and animations and I need to figure out a way to
package them so I can use them throughout my app. I thought I should
be able to use ViewGroup, however, things are getting a bit
complicated as my animations need to repeat and to achieve that I have
applied the technique with an AnimationListener posting to a Runnable
when the animation stops so it plays again in a loop. Also they all
have different startOffset values, and I'm not sure how a ViewGroup
can handle that as well. What is the best practice for hadnling
multiple views and animations? Thanks.
--~--~---------~--~----~------------~-------~--~----~



ViewGroup, Views and Animation

by Romain Guy » Sun, 15 Feb 2009 07:57:54 GMT


 Animations have a repeat mode, no need to do it yourself. Also, why
wouldn't ViewGroup handle the startOffset? From your email, I don't
really understand what your problem is exactly :)

On Sat, Feb 14, 2009 at 3:52 PM, mobilek...@googlemail.com





-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


ViewGroup, Views and Animation

by mobilek...@googlemail.com » Sun, 15 Feb 2009 08:31:23 GMT


 Ok, well I'm a bit new to animations on android, and wasn't sure if
ViewGropus was the right path for me. Btw how would you set the repeat
mode for an animation? I've tried the java way but it didn't work.




--~--~---------~--~----~------------~-------~--~----~



ViewGroup, Views and Animation

by Romain Guy » Sun, 15 Feb 2009 08:35:14 GMT


 Use Animation.setRepeatMode() and Animation.setRepeatCount().

On Sat, Feb 14, 2009 at 4:31 PM, mobilek...@googlemail.com






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~



ViewGroup, Views and Animation

by ursnavin » Fri, 06 Mar 2009 15:46:07 GMT


 Hi all,

I have got a similar problem.

Suppose,If the user long presses a key,the animation should run till
the keyup...

For this i tried starting the animation on a new thread with a lock on
a flag variable,till the first animation ends.

Now when the user is still pressing his key,the thread is created with
the nxt animation in it....

On keyup the main thread gets the lock on the flag variable,and relays
the child views in thier new position....

This logic seems to work fine,but after some duration the animation
stops and the application simply hangs,

Is there something that i am missing here.....It would be great if
anyone can tell whether the approach followed is correct or should i
do something else???







--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Fw: WTS Sprint HTC Hero BNIB Unlocked...

Iya sayang harganya terlalu tinggi utk handset cdma dimana paling tinggi
kecepatan baru evdo aja:




Untuk harga segitu , kyknya masih mikir ya buat HP CDMA. Apalagi lebih
mahal dari versi GSM nya kecuali kalo memang maniak Hero jadi pake 2 Hero di GSM & CDMA Heuw heuw
heuw ... Mangstab 
Andremagis
07:25:51
@Braga


Sent from my BlackBerry
powered by Sinyal Kuat INDOSAT

-----Original Message----- From: "IwanH" <iwan.andr...@gmail.com> Date: Thu,
5 Nov 2009 22:55:37 T...

--~--~---------~--~----~------------~-------~--~----~
Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to id-android@googlegroups.com

To request to subscribe to this group:

Click  

2. How to know the device state(landscape/portrai) programatically

Out of curiosity, why do you ask?  (If it's only because you want to
have a different layout for landscape, then you should know that you
can specify layouts specifically for landscape in /res/layout-land)

-- PJ







-- 

3. Listing on Android Market

4. how to update a ListView in a Tab

5. Keyboard, detect ALT Locked

6. how to set xml attributes in code

7. we are going to the second round