diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 15:25:17 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-05-11 15:25:17 -0700 |
commit | e6c6e1749deaa800b8da021b2e29fbd295a656cc (patch) | |
tree | 0301abe23fb45212985bcc52ec0b3444f791c811 /subsonic-android/src/github | |
parent | ad8547948760ae0f17200517673494b751dbc16b (diff) | |
download | dsub-e6c6e1749deaa800b8da021b2e29fbd295a656cc.tar.gz dsub-e6c6e1749deaa800b8da021b2e29fbd295a656cc.tar.bz2 dsub-e6c6e1749deaa800b8da021b2e29fbd295a656cc.zip |
Fix > 2 nested DirectoryFragments not working
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 209e22b2..1d7c0073 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -72,6 +72,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
rootView = inflater.inflate(R.layout.select_album, container, false);
+ if(!primaryFragment) {
+ ((ViewGroup)rootView).getChildAt(0).setVisibility(View.GONE);
+ }
entryList = (DragSortListView) rootView.findViewById(R.id.select_album_entries);
footer = LayoutInflater.from(context).inflate(R.layout.select_album_footer, entryList, false);
@@ -106,7 +109,11 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter albumListType = args.getString(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_TYPE);
albumListSize = args.getInt(Constants.INTENT_EXTRA_NAME_ALBUM_LIST_SIZE, 0);
}
- load(false);
+ if(primaryFragment) {
+ load(false);
+ } else {
+ invalidated = true;
+ }
return rootView;
}
@@ -233,6 +240,18 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter }
}
}
+
+ @Override
+ public void setPrimaryFragment(boolean primary) {
+ super.setPrimaryFragment(primary);
+ if(rootView != null) {
+ if(primary) {
+ ((ViewGroup)rootView).getChildAt(0).setVisibility(View.VISIBLE);
+ } else {
+ ((ViewGroup)rootView).getChildAt(0).setVisibility(View.GONE);
+ }
+ }
+ }
@Override
protected void refresh(boolean refresh) {
|