Could someone let me know how exactly android makes the sliding text
on an icon slide up to the end of the text?  Currently I'm using
TranslateAnimation to slide the text, but this is hard since text can
change lengths and just gets too complex... :(

Help!?

Thanks!
Moto!

my current code:

float textHolderWidth = 1000; // GetWidth doesn't work
float textWidth = p.measureText(streamName.getText().toString());
float moveRatio = (textWidth / textHolderWidth);

TranslateAnimation animSlideInRight =  new TranslateAnimation
( Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -
moveRatio,0,0,0,0);
animSlideInRight.setInterpolator(new AccelerateDecelerateInterpolator
());
animSlideInRight.setDuration(10000);
animSlideInRight.setStartOffset(1000);
animSlideInRight.setRepeatCount(TranslateAnimation.INFINITE);
animSlideInRight.setRepeatMode(TranslateAnimation.REVERSE);
animSlideInRight.setZAdjustment(TranslateAnimation.ZORDER_BOTTOM);
streamName.startAnimation(animSlideInRight);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to