Draw outside the onDraw() function

by Rahul Garg » Thu, 13 May 2010 19:36:30 GMT


Sponsored Links
 Hi ,
        I want to change the particular portion of my canvas by
clicking the menu button. but as onKeyDown() function is called after
the onDraw() function, I am unable to modify my canvas. what should i
do?

--



Draw outside the onDraw() function

by TreKing » Thu, 13 May 2010 23:40:12 GMT


 



Can't you call invalidate or postInvalidate or something to trigger another
draw call?

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


Draw outside the onDraw() function

by Rahul Garg » Fri, 14 May 2010 10:54:11 GMT


 No that is also not working .....






>



Other Threads

1. Gradient banding on high DPI devices

Hi all,

I've been looking at some issues with the background of our
application, particularly on high-density devices (240 dpi, 480x854).

I managed to eliminate banding on existing devices (i.e. G1/G2, 160
dpi) by applying the android:dither="true" attribute to our nine-patch
image, which is a 1x480px PNG with no noise added.  Looks great.

However, if I use the same image on a higher resolution device, the
banding is pretty {*filter*} looking.  Same happens regardless of whether I
use a shape+gradient, a noisy nine-patch PNG, or an android:dithered
nine-patch PNG -- even if I create an 854px-tall image.

Is the use of gradients going to become a problem on high screen
density devices, purely because of the display colour depth, or is
there any way to solve this?

Thanks,
Chris

-- 

2. View Flipper Performance with MapView

Hi,

currently i'm developing an ANDROID app and i have a question about
ViewFlipper.  I made a design that can be resume as :
1)User can search for items with a criteria, this view is the default
view in the ViewFlipper instance.
2)Another View (a list of items that match with the criteria) is added
to the VF, if the user click in some item a new View will open.
3)This new view is also added to VF, but is a MapView, until here
there's no problem, but once i add an animated overlay to this MapView
the animation the performance decrease.
I tried the same view inside the VF without other views and the
performance it's 3 or 4 times faster, the only solution i found to
improve the performance is mantain the views in memory with a
singleton class and add the view to the VF only to show the animation
and the remove the previous view. In other words i need to mantain the
views in some place else outside the VF and only having the current
view and add a new one just to switch the view and make some
animations.

This is a bug? or i'm doing something wrong?

--

3. Using a US IR Receiver with Android

4. Android 2.0 on G1

5. ImageView with changing drawable resource.

6. About Monkey -f [scriptfile] option

7. will older phones be able to upgrade to 2.0?