Android: override default Back Button action in TabActivity

I found that it is impossible to override Back button action in TabActivity.
You should do it in the hosted activities

In this example, pressing Back button will put your app to back. Default behaviour will close it.
Note: you should put back you TabActivity, not hosted activity.