Fixed bug with plugins not update status after resume

This commit is contained in:
Denis 2014-11-24 17:31:58 +02:00
parent 9371111425
commit 8ffd96ec82
2 changed files with 15 additions and 2 deletions

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/plugins"
android:orientation="vertical"
android:background="@drawable/bg_cardui"
android:layout_width="match_parent"
@ -17,4 +16,10 @@
style="@style/DashboardGeneralButton"/>
</LinearLayout>
<LinearLayout android:id="@+id/plugins"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
</LinearLayout>
</LinearLayout>

View file

@ -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();