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. getting time, 5 minutes into future, past 55 minutes in the hour near midnight with TimePicker dialog

Hi,
Noticed some weird behavior here - if I have:

final Calendar c = Calendar.getInstance();
     int   mHour = c.get(Calendar.HOUR_OF_DAY);
     int   mMinute = c.get(Calendar.MINUTE) + 5;

and I establish a timePickerDialog like:

new TimePickerDialog(this, mTimeSetListener, mHour, mMinute, false);

I seem to have a problem where if, 5 minutes from now, the hour rolls
over and the TimePickerDialog doesn't display the minutes at all, the
hour is incorrect, and I still see PM, not AM.

Note that I did run this at close to midnight - does this look like a
bug, or am I just using it incorrectly?

Thanks
Rob



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

2. Are apps able to make money in Android Marketplace? (or, what is the business case?)

You can find out for yourself. Browse the market with a G1 and check
the number of downloads of some of the at-price apps that compare to
your friend's vision apps and that have been made available for
download for a few weeks now. This would be a 15 to 30 minute exercise
that will give you the business intel you are looking for. Then assume
a return rate, deduct Google's 30% cut from the revenue. You're friend
will now the applicable taxes, ODC etc.
This will be an order of magnitude estimate only, but should be
accurate enough to arrive at a conclusion.




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

3. Are apps able to make money in Android Marketplace? (or, what is the business case?)

4. Replies to Comments within the Market

5. HTTP module missing

6. Merging spannables?

7. Emulator doesn't link sometimes