diff options
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java | 11 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java index 24f8181f..b78724da 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/DownloadActivity.java @@ -44,7 +44,6 @@ import java.util.List; public class DownloadActivity extends SubsonicActivity { private static final String TAG = DownloadActivity.class.getSimpleName(); - private static DownloadFragment fragment; private EditText playlistNameView; /** @@ -56,8 +55,8 @@ public class DownloadActivity extends SubsonicActivity { setContentView(R.layout.download_activity); if (findViewById(R.id.download_container) != null && savedInstanceState == null) { - fragment = new DownloadFragment(); - getSupportFragmentManager().beginTransaction().add(R.id.download_container, fragment).commit(); + currentFragment = new DownloadFragment(); + getSupportFragmentManager().beginTransaction().add(R.id.download_container, currentFragment).commit(); } getSupportActionBar().setDisplayHomeAsUpEnabled(true); @@ -73,14 +72,14 @@ public class DownloadActivity extends SubsonicActivity { startActivity(i); return true; } else { - return false; + return super.onOptionsItemSelected(item); } } @Override public boolean onTouchEvent(MotionEvent me) { - if(fragment != null) { - return fragment.getGestureDetector().onTouchEvent(me); + if(currentFragment != null) { + return ((DownloadFragment)currentFragment).getGestureDetector().onTouchEvent(me); } else { return false; } diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java index 5093934b..7ec4d5c7 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -116,7 +116,6 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle bundle) {
rootView = inflater.inflate(R.layout.download, container, false);
- setHasOptionsMenu(true);
setTitle(nowPlaying ? "Now Playing" : "Downloading");
WindowManager w = context.getWindowManager();
|