Drawable Setbounds not working

by Ashwini » Wed, 21 Apr 2010 20:25:57 GMT


Sponsored Links
 I am trying to scale a drawable at run time depending on the
orientation and and handset dimensions. But this does not seem to take
effect.

This is done on onPreDraw() of textview. It's a textview having text
and images.

Works fine on the 2.x handsets but does not work on the 1.6 ones.
Any ideas on how this can be resolved ?

--



Other Threads

1. Built in ratingbar leaves alot to be desired, has anyone implemented a custom component that works better?

I'm using the ratingbar, and have skinned it to display custom images 
instead of stars, but I find that it often doesn't work properly, with 
incorrect shading, and inability to set a different 'intermediate' image 
for 'half' stars...  An example of this might be for something like 
rottentomatoes.com where their rating star would be a plump tomato and a 
half star would be a squished one.... something like that.


Has anyone already implemented such a component that is open source, rather than reinventing the wheel? Thanks! Mike --

2. Animation and flickering - a possible solution

I have a code that after a TraslateAnimation() ends the layout gets
recomputed (by using AnimationListener). This cause to flickering
effect.

I suspect that this problem  happens since the onAnimationEnd event is
called before the drawing of the last frame.

My solution was to postpone the layout process by a few milliseconds
and set the fillAfter(true) for the animation.

This will persist  the last frame of the animation before the re-
layout.

Hope this helps.

Lidor




-- 

3. Launch an Activity Form a Service

4. video gallery within tab view

5. concept of sync

6. Inter-app connectivity

7. How to import individual projects from Android Source Code