Show current highlighter in as ActionBar subtitle
This commit is contained in:
parent
3172fc4e69
commit
2765200d0b
@ -201,6 +201,8 @@ public class IITC_MapSettings implements OnItemSelectedListener, OnItemClickList
|
||||
mBaseLayers.clear();
|
||||
mOverlayLayers.clear();
|
||||
|
||||
mIitc.getNavigationHelper().setHighlighter(null);
|
||||
|
||||
mLoading = true;
|
||||
}
|
||||
|
||||
@ -210,6 +212,8 @@ public class IITC_MapSettings implements OnItemSelectedListener, OnItemClickList
|
||||
int position = mHighlighters.getPosition(mActiveHighlighter);
|
||||
if (position >= 0 && position < mHighlighters.getCount())
|
||||
mSpinnerHighlighter.setSelection(position);
|
||||
|
||||
mIitc.getNavigationHelper().setHighlighter(name);
|
||||
}
|
||||
|
||||
public void setLayers(String base_layer, String overlay_layer) {
|
||||
|
@ -111,6 +111,7 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt
|
||||
private boolean mIsLoading;
|
||||
private boolean mHideInFullscreen = false;
|
||||
private Pane mPane = Pane.MAP;
|
||||
private String mHighlighter = null;
|
||||
|
||||
public IITC_NavigationHelper(IITC_Mobile activity, ActionBar bar) {
|
||||
super(activity, (DrawerLayout) activity.findViewById(R.id.drawer_layout),
|
||||
@ -217,6 +218,11 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt
|
||||
mActionBar.setTitle(getPaneTitle(mPane));
|
||||
}
|
||||
|
||||
if (!isDrawerOpened() && (mDesktopMode || mPane == Pane.MAP))
|
||||
mActionBar.setSubtitle(mHighlighter);
|
||||
else
|
||||
mActionBar.setSubtitle(null);
|
||||
|
||||
if (mFullscreen && mHideInFullscreen)
|
||||
mActionBar.hide();
|
||||
else
|
||||
@ -317,6 +323,11 @@ public class IITC_NavigationHelper extends ActionBarDrawerToggle implements OnIt
|
||||
updateActionBar();
|
||||
}
|
||||
|
||||
public void setHighlighter(String name) {
|
||||
mHighlighter = name;
|
||||
updateActionBar();
|
||||
}
|
||||
|
||||
public void setLoadingState(boolean isLoading) {
|
||||
mIsLoading = isLoading;
|
||||
updateActionBar();
|
||||
|
Loading…
x
Reference in New Issue
Block a user