public SampleView(Context context, String shape, float[] params) {
                   super(context);
                   setFocusable(true);
                   setFocusableInTouchMode(true);
                   cv = new CanvasView(context, shape, params);

                   if (demo) {
                                AnimateDrawable mDrawable;
                            Drawable dr =
context.getResources().getDrawable(R.drawable.finger);
                            dr.setBounds(0, 0, dr.getIntrinsicWidth(),
dr.getIntrinsicHeight());

                            Log.d("bla", "jjjj");
                            Animation tap1 = new TranslateAnimation(200, 210, 
300,
290);
                            tap1.setDuration(1000);
                            tap1.setRepeatCount(1);
                            tap1.initialize(10, 10, 10, 10);
                            mDrawable = new AnimateDrawable(dr, tap1);

                            AnimateDrawable mDrawable2;
                            Animation tap2 = new TranslateAnimation(210, 200, 
290,
300);
                            tap2.setStartOffset(1000);
                            tap2.setDuration(1000);
                            tap2.setRepeatCount(1);
                            tap2.initialize(10, 10, 10, 10);
                            mDrawable2 = new AnimateDrawable(dr, tap2);

                            AnimateDrawable mDrawable3;
                            Animation tap3 = new TranslateAnimation(230, 220, 
230,
310);
                            tap3.setStartOffset(2000);
                            tap3.setDuration(1000);
                            tap3.setRepeatCount(1);
                            tap3.initialize(10, 10, 10, 10);
                            mDrawable3 = new AnimateDrawable(dr, tap3);


                            AnimationDrawable ad = new AnimationDrawable();
                            ad.addFrame(mDrawable, 1000);
                            ad.addFrame(mDrawable2, 1000);
                            ad.addFrame(mDrawable3, 1000);
                            ad.setOneShot(true);

                            cv.setBackgroundDrawable(ad);
                            ad.start();
                   }
               }

On 5 ספטמבר, 17:47, Appaholics <raghavs...@appaholics.in> wrote:
> Would you mind posting more of your code?
>
> Thanks
>
>
>
>
>
>
>
>
>
> On Mon, Sep 5, 2011 at 8:15 PM, Hadas Mobile <hadas.mob...@gmail.com> wrote:
> > Bc"d
> > Hi,
> > I write animation, but- even that I use with
> > AnimationDrawable.addFrame(mDrawable, 1000);
> > the animation not repeat.
> > What it can be???
>
> > Thanks
> > Hadas Mobile
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> ------------------
> Raghav Sood
> CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
> required to have complete 
> control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to