Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
stop gif frame animation after completion of frames
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Narendra Singh Rathore  
View profile  
 More options Jun 4 2012, 7:29 am
From: Narendra Singh Rathore <nsr.curi...@gmail.com>
Date: Mon, 4 Jun 2012 16:59:52 +0530
Local: Mon, Jun 4 2012 7:29 am
Subject: stop gif frame animation after completion of frames

Hi all,
Here I want to show display gif image, for which I found the solution to
display frames of that image and use animation in that.
The following tutorial (link) helped me out in that.

http://www.blindndumb.com/2012/02/android-tutorial-playing-gif-animat...

Here using this link, the animation started, as I wanted,
but the problem I have to face here is the animation never stops, even if
all the frames got completed.
It repeats and repeats again. I just want it to be stop instantly if all
the frames are being displayed once.

Please direct me in this.

Thanks n Regards.
NSR.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David Olsson  
View profile  
 More options Jun 4 2012, 7:57 am
From: David Olsson <zooklu...@gmail.com>
Date: Mon, 4 Jun 2012 13:57:41 +0200
Local: Mon, Jun 4 2012 7:57 am
Subject: Re: [android-developers] stop gif frame animation after completion of frames

http://developer.android.com/reference/android/graphics/drawable/Anim...

http://developer.android.com/reference/android/graphics/drawable/Anim...

android:oneshot<http://developer.android.com/reference/android/graphics/drawable/Anim...>If
true, the animation will only run a single time and then stop. The link you
gave us uses oneshot false.

Btw, you might want to show us your code.

/David

On Mon, Jun 4, 2012 at 1:29 PM, Narendra Singh Rathore <


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Narendra Singh Rathore  
View profile  
 More options Jun 4 2012, 7:58 am
From: Narendra Singh Rathore <nsr.curi...@gmail.com>
Date: Mon, 4 Jun 2012 17:28:24 +0530
Local: Mon, Jun 4 2012 7:58 am
Subject: Re: stop gif frame animation after completion of frames

Well, that problem solved using oneshot property, by setting it to true.
(silly mistake)

Now I am suffering from the problem that I want to start the animation
again on click event like here, but it is playing only for the first click,
not after that.

  image=(ImageView)findViewById(R.id.img);
image.setImageResource(R.drawable.piggy_bank);
// xml animation file, in which the frames are given
image.setOnClickListener(new OnClickListener() {

            public void onClick(View v) {
                // TODO Auto-generated method stub
                AnimationDrawable startAnimation = (AnimationDrawable)
image.getDrawable();
                   startAnimation.start();

            }
        });

Please help me sorting this.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »