How android.view.View.invalidate(int l, int t, int r, int b) make only the dirty area redrawn?

by Romain Guy » Sat, 07 Mar 2009 12:12:48 GMT


Sponsored Links
 This just sets the clip bounds. You will receive an onDraw(Canvas)
call as usual and everything you draw outside of the clip bounds will
be ignored. You can do ahead-of-time skips if you know you are
performing intensive computations in onDraw() (which you should not be
doing anyway) but it's most often not worth it.






-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

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



Other Threads

1. Android 1.5 with tablets compatibility

Hi all ...

My problem is that I'm developing an app with android 1.5 for all
devices compatibility, but when I ran it into a tablet, it appears
small in the middle of screen, now my question is: Is it posible to
run this app in tablets occupying all the screen space and how can I
do it ?

Thanks for your help ...

Greetings

-- 

2. On Click method not working for buttons gotten by inflating the layout!

All my other On Click methods work except the ones the I have to
inflate the layout "to get the button". What should I do to make this
work? Or is it just my code that is wrong?

Here are how I define my On Click listeners for the problem buttons:

Button updateLevel =
(Button)getLayoutInflater().inflate(R.layout.level,
null).findViewById(R.id.updateLevel);

        updateLevel.setOnClickListener(new View.OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                setLevelOnClick(v);

                        }
                });

   Button goBackMainMenu = (Button)
getLayoutInflater().inflate(R.layout.play,
null).findViewById(R.id.tomenu);
        goBackMainMenu.setOnClickListener(new View.OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                toMenuOnClick(v);

                        }
                });

Here are my onClick actions:

protected void toMenuOnClick(View v) {
                setContentView(R.layout.main);

        }




        protected void setLevelOnClick(View v) {

                setContentView(R.layout.main);


        }

What is wrong?

-- 

3. holographic theme without building against Android 3.0

4. OOT: Tes.... Tes....

5. Req: Java Developer

6. Cache for mapview on android.

7. JDBC driver connection problem