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.
'옛날' 카테고리의 다른 글
| 네트워크 상태 [Android] (0) | 2015.12.11 |
|---|---|
| Tabhost custom [Android] (0) | 2015.12.11 |
| 다른앱 호출 [Android] (0) | 2015.12.11 |
| 종료 다이얼로그 [Android] (0) | 2015.12.11 |
| 진동 효과 [Android] (0) | 2015.12.11 |