diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2022-10-03 21:17:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-03 21:17:39 +0200 |
commit | 4014951e9c02f7ff6ba41cebe629211fe0ecb4e9 (patch) | |
tree | 254163b9eb84ae5e4f27ee9a8606ca4f2bd4786b | |
parent | 2a47d3136fc80b92b60203173764a9a32d9efb58 (diff) | |
parent | e4419579d7843f3446c7ed2d10ddab8222cf38b4 (diff) | |
download | AntennaPod-4014951e9c02f7ff6ba41cebe629211fe0ecb4e9.zip |
Merge pull request #6124 from ByteHamster/fix-chapter-crash
Fix chapters dialog crashing
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java index 2a225fb77..a155207aa 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java @@ -5,34 +5,30 @@ import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; -import android.view.ViewGroup; import android.widget.ProgressBar; -import android.widget.RelativeLayout; - import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import com.google.android.material.dialog.MaterialAlertDialogBuilder; import androidx.appcompat.app.AppCompatDialogFragment; +import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.recyclerview.widget.DividerItemDecoration; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; - -import de.danoeh.antennapod.playback.base.PlayerStatus; -import org.greenrobot.eventbus.EventBus; -import org.greenrobot.eventbus.Subscribe; -import org.greenrobot.eventbus.ThreadMode; - +import com.google.android.material.dialog.MaterialAlertDialogBuilder; import de.danoeh.antennapod.R; import de.danoeh.antennapod.adapter.ChaptersListAdapter; -import de.danoeh.antennapod.event.playback.PlaybackPositionEvent; import de.danoeh.antennapod.core.util.ChapterUtils; import de.danoeh.antennapod.core.util.playback.PlaybackController; +import de.danoeh.antennapod.event.playback.PlaybackPositionEvent; import de.danoeh.antennapod.model.feed.Chapter; import de.danoeh.antennapod.model.playback.Playable; +import de.danoeh.antennapod.playback.base.PlayerStatus; import io.reactivex.Maybe; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; +import org.greenrobot.eventbus.EventBus; +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; public class ChaptersFragment extends AppCompatDialogFragment { public static final String TAG = "ChaptersFragment"; @@ -77,8 +73,8 @@ public class ChaptersFragment extends AppCompatDialogFragment { progressBar.setVisibility(View.VISIBLE); - RelativeLayout.LayoutParams wrapHeight = new RelativeLayout.LayoutParams( - ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); + CoordinatorLayout.LayoutParams wrapHeight = new CoordinatorLayout.LayoutParams( + CoordinatorLayout.LayoutParams.MATCH_PARENT, CoordinatorLayout.LayoutParams.WRAP_CONTENT); recyclerView.setLayoutParams(wrapHeight); return root; |