How to listen for touch events from *Lock Screen* and *Home Screen*

by Dianne Hackborn » Mon, 27 Jul 2009 12:58:52 GMT

Sponsored Links
 Depends on how you define better.  Allowing apps to see users draw their
lock pattern would be not too cool, for example.

Dianne Hackborn
Android framework engineer

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


Other Threads

1. App not visible in Android Market of Samsung Galaxy

The application is Wonderstocks and it is free but copy-protected. I have
just noticed by the way that no paid applications are visible... I also must
add that there is no sim card for the time being in the phone, so:
- is the sim card necessary in order for the copy protected/paid apps to be
visible in the android market?

- is it that samsung/Bouygues Tel have excluded copy protected/paid apps
from the android market?


2. How to implement this simple animation ?


I would like to implement a simple animation using View

The animation involves drawing  a rectangle (w =20px, h =10px)  moving
from left to right at a 10px increment.

I have two questions:

(1) As the rect moves along, the previous drawing needs to be erased
     so the rect appears moving along.

     My implementation erases by painting the previous rect with
     background color.  This works but doubles the drawing.

     Is there a more efficient way of erasing previous rect ?

(2) A time delay is also required between two drawings to show
      movement. Without the delay, only the final rect  will appear

      My view class implements Runnable & has a Handler.
      The run method updates the Rect location & invalidates.
      I have a draw method that puts in the delay, like so:

      public void draw() {
        for(int i =0; i<20; i++) {
            handler.postDelayed(this, i*1000);  //1 sec per drawing

(1) & (2) cause the rect to go from left to right in 10px increment on
1-sec interval.

As the animation is simple, I would like to use View (not SurfaceView
or Animation) and it's OK to do all the work in UI thread.

Is there a more efficient way than the one described above to
implement this simple animation ?

Suggestions & comments are appreciated.



3. How does android Gallery scrolls on a TrackBall Event

4. Automatic Updates - iphone vastly superior (Was Availability of Developer Phone.)

5. RadioButton setTextColor doesn't work during runtime

6. Technote android-2.6.31-001: How to regenerate bionic/libc/common/kernel headers for linux kernel v2.6.31

7. POSIXLY_CORRECT env. var causes obtuse build error (Problem and suggested fix)