diff --git a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java index 9a44fcca3c..6bc8486a51 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/DashAudioVideoNotesFragment.java @@ -9,7 +9,6 @@ import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.dashboard.DashBaseFragment; -import net.osmand.plus.myplaces.FavoritesActivity; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.Nullable; @@ -39,6 +38,7 @@ public class DashAudioVideoNotesFragment extends DashBaseFragment { @Override public void onClick(View view) { startFavoritesActivity(AudioVideoNotesPlugin.NOTES_TAB); + closeDashboard(); } }); return view; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java index 9c8494dec4..b9afdd5e72 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashBaseFragment.java @@ -43,6 +43,10 @@ public abstract class DashBaseFragment extends Fragment { onCloseDash(); } + public void closeDashboard() { + dashboard.hideDashboard(false); + } + @Override public final void onResume() { // use on open update diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java index cf800535e9..92fd7dc223 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashFavoritesFragment.java @@ -40,6 +40,7 @@ public class DashFavoritesFragment extends DashLocationFragment { @Override public void onClick(View view) { startFavoritesActivity(FavoritesActivity.FAV_TAB); + closeDashboard(); } }); return view; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java index d359b60bac..5e243474b0 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java @@ -37,6 +37,7 @@ public class DashPluginsFragment extends DashBaseFragment { @Override public void onClick(View view) { startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(plugin.getInstallURL()))); + closeDashboard(); } }; } @@ -48,6 +49,7 @@ public class DashPluginsFragment extends DashBaseFragment { Intent intent = new Intent(getActivity(), PluginActivity.class); intent.putExtra(PluginActivity.EXTRA_PLUGIN_ID, plugin.getId()); startActivity(intent); + closeDashboard(); } }; } @@ -61,6 +63,7 @@ public class DashPluginsFragment extends DashBaseFragment { @Override public void onClick(View view) { startActivity(new Intent(getActivity(), getMyApplication().getAppCustomization().getPluginsActivity())); + closeDashboard(); } }); initPlugins(); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java index 48dd9d4132..dfe883f8c2 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashRecentsFragment.java @@ -52,6 +52,7 @@ public class DashRecentsFragment extends DashLocationFragment { search.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); getMyApplication().getSettings().SEARCH_TAB.set(SearchActivity.HISTORY_TAB_INDEX); activity.startActivity(search); + closeDashboard(); } }); return view; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java index ef64c530ad..e62f0635ef 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashSearchFragment.java @@ -56,7 +56,7 @@ public class DashSearchFragment extends DashBaseFragment { btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - dashboard.hideDashboard(false); + closeDashboard(); searchActivity(activity, appCustomization, SearchActivity.POI_TAB_INDEX); } }); @@ -67,7 +67,7 @@ public class DashSearchFragment extends DashBaseFragment { btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - dashboard.hideDashboard(false); + closeDashboard(); searchActivity(activity, appCustomization, SearchActivity.ADDRESS_TAB_INDEX); } }); @@ -78,7 +78,7 @@ public class DashSearchFragment extends DashBaseFragment { btn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - dashboard.hideDashboard(false); + closeDashboard(); searchActivity(activity, appCustomization, SearchActivity.LOCATION_TAB_INDEX); } }); @@ -88,7 +88,7 @@ public class DashSearchFragment extends DashBaseFragment { (view.findViewById(R.id.recents)).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - dashboard.hideDashboard(false); + closeDashboard(); searchActivity(activity, appCustomization, SearchActivity.HISTORY_TAB_INDEX); } }); diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashUpdatesFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashUpdatesFragment.java index 14e4172c33..6905c3c319 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashUpdatesFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashUpdatesFragment.java @@ -56,6 +56,7 @@ public class DashUpdatesFragment extends DashBaseFragment { intent.putExtra(DownloadActivity.TAB_TO_OPEN, DownloadActivity.UPDATES_TAB); // intent.putExtra(DownloadActivity.SINGLE_TAB, true); getActivity().startActivity(intent); + closeDashboard(); } }); return view; diff --git a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java index d19090985a..5039514482 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/DashTrackFragment.java @@ -60,6 +60,7 @@ public class DashTrackFragment extends DashBaseFragment { getMyApplication().getSettings().FAVORITES_TAB.set(FavoritesActivity.GPX_TAB); favorites.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); activity.startActivity(favorites); + closeDashboard(); } }); return view; diff --git a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java index 555831580d..ee1876d123 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/DashOsmEditsFragment.java @@ -46,6 +46,7 @@ public class DashOsmEditsFragment extends DashBaseFragment implements OsmEditsUp @Override public void onClick(View view) { startFavoritesActivity(R.string.osm_edits); + closeDashboard(); } }); diff --git a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java index 3031252286..daa10cdff7 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java +++ b/OsmAnd/src/net/osmand/plus/osmo/DashOsMoFragment.java @@ -362,6 +362,7 @@ public class DashOsMoFragment extends DashLocationFragment implements OsMoGroups private void launchOsMoGroupsActivity() { Intent intent = new Intent(getActivity(), OsMoGroupsActivity.class); getActivity().startActivity(intent); + closeDashboard(); } @Override diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java index ff3aca7f94..fb76528a39 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/DashParkingFragment.java @@ -1,17 +1,7 @@ package net.osmand.plus.parkingpoint; -import android.app.AlertDialog; -import android.content.DialogInterface; -import android.graphics.Color; -import android.graphics.Typeface; -import android.graphics.drawable.Drawable; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.ImageView; -import android.widget.TextView; +import java.util.Calendar; + import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.plus.OsmandPlugin; @@ -19,9 +9,17 @@ import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; import net.osmand.plus.dashboard.DashLocationFragment; import net.osmand.plus.helpers.FontCache; -import net.osmand.plus.views.DirectionDrawable; - -import java.util.Calendar; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.graphics.Color; +import android.graphics.Typeface; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.TextView; /** * Created by Denis on