mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-30 06:12:07 +00:00
Pressing the three dots now opens the Podcast BottomSheetDialog
This commit is contained in:
1
.idea/misc.xml
generated
1
.idea/misc.xml
generated
@@ -82,6 +82,7 @@
|
||||
<entry key="app/src/main/res/layout/activity_main.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/bottom_sheet_album_dialog.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/bottom_sheet_artist_dialog.xml" value="0.225" />
|
||||
<entry key="app/src/main/res/layout/bottom_sheet_podcast_dialog.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/bottom_sheet_song_dialog.xml" value="0.21666666666666667" />
|
||||
<entry key="app/src/main/res/layout/chip_search_filter_genre.xml" value="0.3229166666666667" />
|
||||
<entry key="app/src/main/res/layout/dialog_connection_alert.xml" value="0.3537037037037037" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cappielloantonio.play.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@@ -10,6 +11,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.media3.session.MediaBrowser;
|
||||
import androidx.navigation.Navigation;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
||||
@@ -101,6 +103,8 @@ public class PodcastEpisodeAdapter extends RecyclerView.Adapter<PodcastEpisodeAd
|
||||
moreButton = itemView.findViewById(R.id.podcast_more_button);
|
||||
|
||||
playButton.setOnClickListener(this);
|
||||
|
||||
moreButton.setOnClickListener(this::openMore);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -108,5 +112,11 @@ public class PodcastEpisodeAdapter extends RecyclerView.Adapter<PodcastEpisodeAd
|
||||
MediaManager.startQueue(mediaBrowserListenableFuture, context, podcastEpisodes.get(getBindingAdapterPosition()));
|
||||
activity.setBottomSheetInPeek(true);
|
||||
}
|
||||
|
||||
private void openMore(View view) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("podcast_object", podcastEpisodes.get(getBindingAdapterPosition()));
|
||||
Navigation.findNavController(view).navigate(R.id.podcastBottomSheetDialog, bundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user