summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2022-10-03 12:12:57 +0200
committerByteHamster <info@bytehamster.com>2022-10-03 12:12:57 +0200
commite4419579d7843f3446c7ed2d10ddab8222cf38b4 (patch)
tree12bc805724623e530884e1ea0742d967ce1dab64
parent9783f5dc253dcf567d430d7892506bda3ca9cb0a (diff)
downloadAntennaPod-e4419579d7843f3446c7ed2d10ddab8222cf38b4.zip
Fix chapters dialog crashing
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/ChaptersFragment.java22
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;