Why different behaviour when exiting app using BACK and HOME ?

by Jean-Baptiste Queru » Thu, 05 Mar 2009 21:58:02 GMT


Sponsored Links
 The default behavior of the back key is to exit your activity by
calling finish() (which should pop to the next activity in the
activity stack of the task your activity was in, or to another task if
your activity was at the bottom of its task). You can override that.

The behavior of the home key is to switch to the home application, but
your activity doesn't exit.

JBQ






-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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



Why different behaviour when exiting app using BACK and HOME ?

by Jean-Baptiste Queru » Fri, 06 Mar 2009 05:10:04 GMT


 You can capture the back key and make it do whatever you want.

JBQ








-- 
Jean-Baptiste M. "JBQ" Queru
Android Engineer, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

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


Sponsored Links


Why different behaviour when exiting app using BACK and HOME ?

by Marco Nelissen » Fri, 06 Mar 2009 06:22:27 GMT


 ctivity.onKeyDown()


On Thu, Mar 5, 2009 at 2:11 PM, TAKEphONE <shimo...@gmail.com> wrote:

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



Why different behaviour when exiting app using BACK and HOME ?

by Dianne Hackborn » Fri, 06 Mar 2009 07:02:22 GMT


 ut, you know, changing your app to be inconsistent with the standard app
model used by the system is generally not a good idea.

Every app I download that doesn't let me press back to get out of it has a
special little black spot in my heart.

On Thu, Mar 5, 2009 at 2:55 PM, TAKEphONE <shimo...@gmail.com> wrote:



--
Dianne Hackborn
Android framework engineer
hack...@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.

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



Why different behaviour when exiting app using BACK and HOME ?

by Dianne Hackborn » Fri, 06 Mar 2009 07:42:47 GMT


 




To be fair, the browser is basically emulating an activity stack within a
single activity, so it makes sense for it to steal the back key in certain
situations to do that behavior.

But sometimes it does the wrong thing, and is very annoying.

-- 
Dianne Hackborn
Android framework engineer
hack...@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. Message on Locked Screen

Hi,

I want to put out a message from my application on locked screen.
Something like, If Found please call <number>

Is there a way to do it ?
I see there is a FLAG_SHOW_WHEN_LOCKED flag using which I assume it
can be done.
Can anyone provide some example ?

Regards,
Tej

-- 

2. loste of quality with bitmap rotation

Hello,
My program stacks several images, with a certain angle of rotation.
The code works, but the image loses of the quality in spite of the
dithering during the rotation (except on right angles 90, 180, 270!).
The image is a black circle and there are peaks which appear with the
rotation which are not visible with the same rotation on gimp or
Photoshop.
I uses the matrix method, but i also tried with the canvas.rotate
method, same result.

Thank you for your help !

Here is my code:

Matrix matrix = new Matrix ();
Matrix.setRotate (rotation, layer.getWidth ()/2, layer.getHeight ()/
2);
This.canvas.drawBitmap (layer, matrix, null);

-- 

3. Paging android-ers bandung

4. Advanced Device Administration

5. ListAdapter source

6. code for download a file

7. Maps doesn't show