Updated downloads only for sherpafy

This commit is contained in:
Denis 2014-09-24 11:47:02 +03:00
parent 40779f714a
commit adb0e3e145
4 changed files with 9 additions and 2 deletions

View file

@ -155,4 +155,6 @@ public class OsmAndAppCustomization {
}
public boolean showNavigationControls() { return true;}
public boolean onlyTourDownload() { return false;}
}

View file

@ -72,7 +72,7 @@ public class DownloadActivity extends SherlockFragmentActivity {
tabHost.setup();
ViewPager viewPager = (ViewPager) findViewById(R.id.pager);
mTabsAdapter = new FavouritesActivity.TabsAdapter(this, tabHost, viewPager, settings, false);
if (Version.isSherpafy(getMyApplication())){
if (getMyApplication().getAppCustomization().onlyTourDownload()){
mTabsAdapter.addTab(tabHost.newTabSpec("DOWNLOADS").setIndicator("Downloads"),
DownloadIndexFragment.class, null);
} else {

View file

@ -191,7 +191,7 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (Version.isSherpafy(getMyApplication())){
if (getMyApplication().getAppCustomization().onlyTourDownload()){
return;
}

View file

@ -735,4 +735,9 @@ public class SherpafyCustomization extends OsmAndAppCustomization {
public boolean showNavigationControls() {
return false;
}
@Override
public boolean onlyTourDownload() {
return true;
}
}