Use INDEX_CAN_UPDATE rather than its hard-coded id
This commit is contained in:
parent
25968d181d
commit
f3ee1201e4
@ -119,7 +119,7 @@ class OldTabManagerImpl extends TabManager {
|
|||||||
public void onTabChanged(String tabId) {
|
public void onTabChanged(String tabId) {
|
||||||
int pos = tabHost.getCurrentTab();
|
int pos = tabHost.getCurrentTab();
|
||||||
pager.setCurrentItem(pos);
|
pager.setCurrentItem(pos);
|
||||||
if (pos == 2)
|
if (pos == INDEX_CAN_UPDATE)
|
||||||
removeNotification(1);
|
removeNotification(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -128,7 +128,7 @@ class OldTabManagerImpl extends TabManager {
|
|||||||
|
|
||||||
public void selectTab(int index) {
|
public void selectTab(int index) {
|
||||||
tabHost.setCurrentTab(index);
|
tabHost.setCurrentTab(index);
|
||||||
if (index == 2)
|
if (index == INDEX_CAN_UPDATE)
|
||||||
removeNotification(1);
|
removeNotification(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +175,7 @@ class HoneycombTabManagerImpl extends TabManager {
|
|||||||
FragmentTransaction ft) {
|
FragmentTransaction ft) {
|
||||||
int pos = tab.getPosition();
|
int pos = tab.getPosition();
|
||||||
pager.setCurrentItem(pos);
|
pager.setCurrentItem(pos);
|
||||||
if (pos == 2)
|
if (pos == INDEX_CAN_UPDATE)
|
||||||
removeNotification(1);
|
removeNotification(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,7 +196,7 @@ class HoneycombTabManagerImpl extends TabManager {
|
|||||||
if (actionBarSpinner != null) {
|
if (actionBarSpinner != null) {
|
||||||
actionBarSpinner.setSelection(index);
|
actionBarSpinner.setSelection(index);
|
||||||
}
|
}
|
||||||
if (index == 2)
|
if (index == INDEX_CAN_UPDATE)
|
||||||
removeNotification(1);
|
removeNotification(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user