From 23106c98b601f9a132c9e105e265cff2dc0d1a8d Mon Sep 17 00:00:00 2001 From: GaidamakUA Date: Fri, 9 Oct 2015 10:39:33 +0300 Subject: [PATCH] Wrong tab deleted fixed --- .../src/net/osmand/plus/download/DownloadActivity.java | 9 +++++---- .../osmand/plus/download/items/RegionItemsFragment.java | 6 ++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index cfd1557287..a741a59ca8 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -112,12 +112,13 @@ public class DownloadActivity extends BaseDownloadActivity implements RegionDial ViewPager viewPager = (ViewPager) findViewById(R.id.pager); PagerSlidingTabStrip mSlidingTabLayout = (PagerSlidingTabStrip) findViewById(R.id.sliding_tabs); + + mTabs.add(new TabActivity.TabItem(R.string.download_tab_local, + getString(R.string.download_tab_local), LocalIndexesFragment.class)); mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads, getString(R.string.download_tab_downloads), WorldItemsFragment.class)); -// mTabs.add(new TabActivity.TabItem(R.string.download_tab_local, -// getString(R.string.download_tab_local), LocalIndexesFragment.class)); - mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads, - getString(R.string.download_tab_downloads), DownloadIndexFragment.class)); +// mTabs.add(new TabActivity.TabItem(R.string.download_tab_downloads, +// getString(R.string.download_tab_downloads), DownloadIndexFragment.class)); mTabs.add(new TabActivity.TabItem(R.string.download_tab_updates, getString(R.string.download_tab_updates), UpdatesIndexFragment.class)); diff --git a/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java b/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java index 825833583e..2001e4f9d8 100644 --- a/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/items/RegionItemsFragment.java @@ -68,7 +68,7 @@ public class RegionItemsFragment extends OsmandExpandableListFragment { regionId = ""; ExpandableListView listView = (ExpandableListView) view.findViewById(android.R.id.list); - listAdapter = new RegionsItemsAdapter(getActivity()); + listAdapter = new RegionsItemsAdapter(); listView.setAdapter(listAdapter); setListView(listView); @@ -166,12 +166,10 @@ public class RegionItemsFragment extends OsmandExpandableListFragment { private boolean nauticalPluginDisabled; private boolean freeVersion; - public RegionsItemsAdapter(Context ctx) { + public RegionsItemsAdapter() { srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null; nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null; freeVersion = Version.isFreeVersion(getMyApplication()); - TypedArray ta = ctx.getTheme().obtainStyledAttributes(new int[]{android.R.attr.textColorPrimary}); - ta.recycle(); } public void clear() {