From 8ffd96ec8277ee81886b3e5aeecb327c5b5a6849 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 24 Nov 2014 17:31:58 +0200 Subject: [PATCH] Fixed bug with plugins not update status after resume --- OsmAnd/res/layout/dash_plugins_fragment.xml | 7 ++++++- .../net/osmand/plus/dashboard/DashPluginsFragment.java | 10 +++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/OsmAnd/res/layout/dash_plugins_fragment.xml b/OsmAnd/res/layout/dash_plugins_fragment.xml index 182052a886..1de89a67d4 100644 --- a/OsmAnd/res/layout/dash_plugins_fragment.xml +++ b/OsmAnd/res/layout/dash_plugins_fragment.xml @@ -1,7 +1,6 @@ + + + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java index b0bf03434b..10b57d41ca 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashPluginsFragment.java @@ -33,10 +33,18 @@ public class DashPluginsFragment extends DashBaseFragment { startActivityForResult(new Intent(getActivity(), getMyApplication().getAppCustomization().getPluginsActivity()), 1); } }); - addPlugins(view); + return view; } + @Override + public void onResume() { + super.onResume(); + LinearLayout layout = (LinearLayout) getView().findViewById(R.id.plugins); + layout.removeAllViews(); + addPlugins(layout); + } + private void addPlugins(View parent){ LinearLayout layout = (LinearLayout) parent; LayoutInflater inflater = getActivity().getLayoutInflater();