commit
0cb8852667
4 changed files with 23 additions and 6 deletions
|
@ -155,4 +155,6 @@ public class OsmAndAppCustomization {
|
|||
}
|
||||
|
||||
public boolean showNavigationControls() { return true;}
|
||||
|
||||
public boolean onlyTourDownload() { return false;}
|
||||
}
|
||||
|
|
|
@ -75,12 +75,18 @@ public class DownloadActivity extends SherlockFragmentActivity {
|
|||
tabHost.setup();
|
||||
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
|
||||
mTabsAdapter = new FavouritesActivity.TabsAdapter(this, tabHost, viewPager, settings, false);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("LOCAL_INDEX").setIndicator("Local"),
|
||||
LocalIndexesFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("DOWNLOADS").setIndicator("Downloads"),
|
||||
DownloadIndexFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("UPDATES").setIndicator("Updates"),
|
||||
UpdatesIndexFragment.class, null);
|
||||
if (getMyApplication().getAppCustomization().onlyTourDownload()){
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("DOWNLOADS").setIndicator("Downloads"),
|
||||
DownloadIndexFragment.class, null);
|
||||
} else {
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("LOCAL_INDEX").setIndicator("Local"),
|
||||
LocalIndexesFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("DOWNLOADS").setIndicator("Downloads"),
|
||||
DownloadIndexFragment.class, null);
|
||||
mTabsAdapter.addTab(tabHost.newTabSpec("UPDATES").setIndicator("Updates"),
|
||||
UpdatesIndexFragment.class, null);
|
||||
}
|
||||
|
||||
tabHost.setCurrentTab(0);
|
||||
|
||||
if(downloadListIndexThread == null) {
|
||||
|
|
|
@ -191,6 +191,10 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment {
|
|||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
if (getMyApplication().getAppCustomization().onlyTourDownload()){
|
||||
return;
|
||||
}
|
||||
|
||||
ActionBar actionBar = getDownloadActivity().getSupportActionBar();
|
||||
final List<DownloadActivityType> downloadTypes = getDownloadActivity().getDownloadTypes();
|
||||
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
||||
|
|
|
@ -735,4 +735,9 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
|
|||
public boolean showNavigationControls() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onlyTourDownload() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue