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. How to Lock the phone by application

Hi,

I'm trying to lock the phone through my application .I'm using following
code

        PowerManager pm =
(PowerManager)context.getSystemService(Context.POWER_SERVICE);
        pm.goToSleep(160000);

I've added following permission to AndroiManifest.xml file

    <uses-permission android:name="android.permission.DEVICE_POWER"/>

But the application crashes by throwing following exception

*E/AndroidRuntime(  436): Caused by: java.lang.SecurityException: Neither
user 10032 nor current process has android.permission.DEVICE_POWER.*

Please help me to avoid the above mentioned exception or tell me some other
way to lock the screen

thanks,
shahzad

--~--~---------~--~----~------------~-------~--~----~

2. Query regarding the Media Provider : android:sharedUserId and android:multiprocess="false"

I am a bit confused after looking at the AndroidManifest.xml in the
Media provider code of android. It would be great if some one can
clarify here:
The file has android:sharedUserId="android.media" and
android:multiprocess="false"

** From my understanding android:multiprocess="false" indicates that
request to content provider would happen over IPC.

** android:sharedUserId="android.media" - Specifies the name of a user
ID that will be shared between multiple packages. By setting this
value on two or more packages, each of these packages will be given a
single shared user ID, so they can for example run in the same process

So if Package1 has android:sharedUserId="android.media" specified and
it uses
uses the android's media provider , the media provider would run in a
separate process or
in the same process as the caller?
--~--~---------~--~----~------------~-------~--~----~

3. Emulator from eclipse

4. How to show dialogs in a service process...

5. Query regarding the Media Provider : android:sharedUserId and android:multiprocess="false"

6. Barcode Library?

7. how to open another screen