aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src/github
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-05-07 22:12:56 -0700
committerScott Jackson <daneren2005@gmail.com>2013-05-07 22:12:56 -0700
commitce8f467cebc86240422ae8bb555f008e6f237bfa (patch)
tree16bcda1c635006faf19a6497c3d559aeb157b25f /subsonic-android/src/github
parent18b801bb82c448d73ab6402e8ccce92b77ff652a (diff)
downloaddsub-ce8f467cebc86240422ae8bb555f008e6f237bfa.tar.gz
dsub-ce8f467cebc86240422ae8bb555f008e6f237bfa.tar.bz2
dsub-ce8f467cebc86240422ae8bb555f008e6f237bfa.zip
Fix orientation change for download fragment and showing controls at the same time
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java
index 52359782..dbedf5b0 100644
--- a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java
+++ b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java
@@ -89,6 +89,7 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
private Button jukeboxButton;
private View toggleListButton;
private ImageButton starButton;
+ private View mainLayout;
private ScheduledExecutorService executorService;
private DownloadFile currentPlaying;
private long currentRevision;
@@ -113,6 +114,11 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
rootView = inflater.inflate(R.layout.download, container, false);
setTitle(nowPlaying ? "Now Playing" : "Downloading");
+
+ mainLayout = rootView.findViewById(R.id.download_layout);
+ if(!primaryFragment) {
+ mainLayout.setVisibility(View.GONE);
+ }
WindowManager w = context.getWindowManager();
Display d = w.getDefaultDisplay();
@@ -524,7 +530,7 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
args.putString(Constants.INTENT_EXTRA_NAME_TITLE, song.getSong().getTitle());
fragment.setArguments(args);
- replaceFragment(fragment, R.id.download_container);
+ replaceFragment(fragment, R.id.download_layout_container);
return true;
case R.id.menu_remove:
new SilentBackgroundTask<Void>(context) {
@@ -678,9 +684,9 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe
super.setPrimaryFragment(primary);
if(rootView != null) {
if(primary) {
- rootView.setVisibility(View.VISIBLE);
+ mainLayout.setVisibility(View.VISIBLE);
} else {
- rootView.setVisibility(View.GONE);
+ mainLayout.setVisibility(View.GONE);
}
}
}