diff --git a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java index 8a1db01948..956980c2d7 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java @@ -155,4 +155,6 @@ public class OsmAndAppCustomization { } public boolean showNavigationControls() { return true;} + + public boolean onlyTourDownload() { return false;} } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 4277d238e1..e33284ab7f 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -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) { diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java index 76b0218898..9012f65446 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java @@ -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 downloadTypes = getDownloadActivity().getDownloadTypes(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java index 3bd0e573c3..32b2837c2f 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java @@ -735,4 +735,9 @@ public class SherpafyCustomization extends OsmAndAppCustomization { public boolean showNavigationControls() { return false; } + + @Override + public boolean onlyTourDownload() { + return true; + } }