TabActivity back key Event [Android] |
|
|
|
7³â Àü
|
It turns out to be pretty easy. Add the following code to your child tab activity :
@Override
public void onBackPressed() {
this.getParent().onBackPressed();
}
Then in the TabActivity do the real logic:
@Override
public void onBackPressed() {
// Called by children
}
Otherwise, the children will intercept and consume the event without notifying the tab host. |
|
̵̧ : 224 |
̵̧
¸ñ·Ï
|
|