hi
I have a problem with an animation of a button.
I would move and fade a button from a origin position to another
position. well i created a translate animation and fade animation, i
start the animation with the follow code:

            AnimationSet exchangeAnimation = new AnimationSet(true);
            exchangeAnimation.setFillAfter(true);
            exchangeAnimation.setAnimationListener(new AnimationListener() {
                  public void onAnimationStart(Animation anim)
{button.setEnabled(false);}
              public void onAnimationRepeat(Animation anim) {}
              public void onAnimationEnd(Animation anim) {
                  button.setEnabled(true);}});
            exchangeAnimation.addAnimation(AnimationHelper.fadeAnimation(0,
1, 2000));
            //i valori passati come fromX, toX, fromY e toY sono dati da un
rapporto e vanno da 0.0F a 1.0F
            //quindi bisogna calcolari come pos voluta / width screen o
height screen
        
exchangeAnimation.addAnimation(AnimationHelper.translateAnimation(0.0F,
0.5F, 0.0F, 0.5F, 1500));
            button.startAnimation(exchangeAnimation);

So, my problem is that while the button moves to the position that I
want, the hit area remains at the point of origin.

somebody can help me on how to correctly position the hit area of the
button?

-- 
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