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

View file

@ -33,10 +33,18 @@ public class DashPluginsFragment extends DashBaseFragment {
startActivityForResult(new Intent(getActivity(), getMyApplication().getAppCustomization().getPluginsActivity()), 1); startActivityForResult(new Intent(getActivity(), getMyApplication().getAppCustomization().getPluginsActivity()), 1);
} }
}); });
addPlugins(view);
return 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){ private void addPlugins(View parent){
LinearLayout layout = (LinearLayout) parent; LinearLayout layout = (LinearLayout) parent;
LayoutInflater inflater = getActivity().getLayoutInflater(); LayoutInflater inflater = getActivity().getLayoutInflater();