Sunday, January 3, 2010

How to set Default Actions for Activities

Hey everyone,

This example is about how to assign DEFAULT actions to various actions. For instance, if you want your home screen to be the default home screen, then in your manifest simply add:

To the activity that you want to be the default home screen. Another example involving the CALL_BUTTON (for instance, in my case I wanted to replace the dialer):

And if you want to replace the default dial action, then it will be:

So now if you start typing in a number from your home screen, your application will appear on the list of possible default behaviors.

Hope this was helpful. Happy coding.

- jwei

[Via http://thinkandroid.wordpress.com]

No comments:

Post a Comment