Pressing the three dots now opens the Podcast BottomSheetDialog

This commit is contained in:
CappielloAntonio 2022-02-08 20:38:26 +01:00
parent 05bf410645
commit 037a371ebc
2 changed files with 11 additions and 0 deletions

1
.idea/misc.xml generated
View file

@ -82,6 +82,7 @@
<entry key="app/src/main/res/layout/activity_main.xml" value="0.3229166666666667" /> <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_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_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/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/chip_search_filter_genre.xml" value="0.3229166666666667" />
<entry key="app/src/main/res/layout/dialog_connection_alert.xml" value="0.3537037037037037" /> <entry key="app/src/main/res/layout/dialog_connection_alert.xml" value="0.3537037037037037" />

View file

@ -1,6 +1,7 @@
package com.cappielloantonio.play.adapter; package com.cappielloantonio.play.adapter;
import android.content.Context; import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -10,6 +11,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.media3.session.MediaBrowser; import androidx.media3.session.MediaBrowser;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners; 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); moreButton = itemView.findViewById(R.id.podcast_more_button);
playButton.setOnClickListener(this); playButton.setOnClickListener(this);
moreButton.setOnClickListener(this::openMore);
} }
@Override @Override
@ -108,5 +112,11 @@ public class PodcastEpisodeAdapter extends RecyclerView.Adapter<PodcastEpisodeAd
MediaManager.startQueue(mediaBrowserListenableFuture, context, podcastEpisodes.get(getBindingAdapterPosition())); MediaManager.startQueue(mediaBrowserListenableFuture, context, podcastEpisodes.get(getBindingAdapterPosition()));
activity.setBottomSheetInPeek(true); 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);
}
} }
} }