diff options
author | ByteHamster <info@bytehamster.com> | 2020-07-16 17:25:20 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2020-07-16 17:25:20 +0200 |
commit | 242614245d9259ede3e368ac520c31105a2fd87f (patch) | |
tree | 92ea8bc5e3cfd5786eb23d6288b3c44c47e46410 | |
parent | 607999064398eba9bd37b9a93c3c8ac19d00a9de (diff) | |
download | AntennaPod-242614245d9259ede3e368ac520c31105a2fd87f.zip |
Close player when selecting sidebar entry
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java index 0dff8f24b..da5710936 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/NavDrawerFragment.java @@ -19,6 +19,7 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; import androidx.appcompat.app.AlertDialog; import androidx.fragment.app.Fragment; +import com.google.android.material.bottomsheet.BottomSheetBehavior; import de.danoeh.antennapod.R; import de.danoeh.antennapod.activity.MainActivity; import de.danoeh.antennapod.activity.PreferenceActivity; @@ -371,6 +372,7 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli String tag = navAdapter.getTags().get(position); if (getActivity() instanceof MainActivity) { ((MainActivity) getActivity()).loadFragment(tag, null); + ((MainActivity) getActivity()).getBottomSheet().setState(BottomSheetBehavior.STATE_COLLAPSED); } else { showMainActivity(tag); } @@ -379,6 +381,7 @@ public class NavDrawerFragment extends Fragment implements AdapterView.OnItemCli long feedId = navDrawerData.feeds.get(pos).getId(); if (getActivity() instanceof MainActivity) { ((MainActivity) getActivity()).loadFeedFragmentById(feedId, null); + ((MainActivity) getActivity()).getBottomSheet().setState(BottomSheetBehavior.STATE_COLLAPSED); } else { Intent intent = new Intent(getActivity(), MainActivity.class); intent.putExtra(MainActivity.EXTRA_FEED_ID, feedId); |