Animating resizing of TextView

by George » Tue, 14 Apr 2009 04:50:38 GMT


Sponsored Links
 I have a textView that changes size dynamically and I want to animate
the resizing.
Here are my steps:
(1) use TextView.layout to set the initial size - editText.layout(0,
0, 200, 50);
(2) use startAnimation(scale) to scale the textView in the Xdirection
(to animate resize)
      <scale
        android:fromXScale="1.0" android:toXScale="1.5"
        android:fromYScale="1.0" android:toYScale="1.0"
        android:pivotX="0%" android:pivotY="0%"
        android:duration="600" />
(3) Set the new size of the textview using layout() - editText.layout
(0, 0, 300, 50);

If I use ScaleAnimation, the text in the view get stretched or
squeezed. Is there a way to animate the resizing of the textview
without causing the text to get stretched or squeezed?

-George
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Dynamic class loading - how?

Is it possible to dynamically load classes from a URL into your
application in the same way as a desktop application can? For example,
can you do a simple boot-strap application which you install onto the
device, that boots up loads the main jars required for the
applications from a server, or from a local jar on the SD for example?

-- 

2. Is it possible for an app to replace the NotificationManager?

Or extend it in some way to allow for pre/post-processing of all
notifications and additional workflow?

-- 

3. Always running all the processes as ROOT in Android.

4. Opening /dev/SOMETHING from Register buffer in gralloc.

5. LVL advice in the Android Developer Blog

6. Samsung Tab Emulator

7. Sqlite busy timeout - [was error code 5: database is locked]