mirror of
https://github.com/Michatec/Radio.git
synced 2026-05-31 00:42:40 +02:00
feat(ui): add visualizer button to collection screen
This commit is contained in:
@@ -169,6 +169,9 @@ class CollectionAdapter(
|
||||
addNewViewHolder.settingsButtonView.setOnClickListener {
|
||||
it.findNavController().navigate(R.id.settings_destination)
|
||||
}
|
||||
addNewViewHolder.visualizerButtonView.setOnClickListener {
|
||||
it.findNavController().navigate(R.id.visualizer_destination)
|
||||
}
|
||||
}
|
||||
// CASE STATION CARD
|
||||
is StationViewHolder -> {
|
||||
@@ -187,6 +190,8 @@ class CollectionAdapter(
|
||||
setPlaybackProgress(stationViewHolder, station)
|
||||
setDownloadProgress(stationViewHolder, station)
|
||||
|
||||
stationViewHolder.playButtonView.isGone = true
|
||||
|
||||
// highlight if reordering
|
||||
if (reorderStationUuid == station.uuid) {
|
||||
stationViewHolder.stationCardView.setStrokeColor(
|
||||
@@ -754,6 +759,8 @@ class CollectionAdapter(
|
||||
listItemAddNewLayout.findViewById(R.id.card_add_new_station)
|
||||
val settingsButtonView: ExtendedFloatingActionButton =
|
||||
listItemAddNewLayout.findViewById(R.id.card_settings)
|
||||
val visualizerButtonView: ExtendedFloatingActionButton =
|
||||
listItemAddNewLayout.findViewById(R.id.card_visualizer)
|
||||
}
|
||||
/*
|
||||
* End of inner class
|
||||
@@ -772,7 +779,6 @@ class CollectionAdapter(
|
||||
val bufferingProgress: ProgressBar = stationCardLayout.findViewById(R.id.buffering_progress)
|
||||
val downloadProgress: ProgressBar = stationCardLayout.findViewById(R.id.download_progress)
|
||||
|
||||
// val menuButtonView: ImageView = stationCardLayout.findViewById(R.id.menu_button)
|
||||
val playButtonView: ImageView = stationCardLayout.findViewById(R.id.playback_button)
|
||||
val editViews: Group = stationCardLayout.findViewById(R.id.default_edit_views)
|
||||
val stationImageChangeView: ImageView =
|
||||
|
||||
@@ -22,6 +22,24 @@
|
||||
app:strokeColor="@color/list_card_stroke_background"
|
||||
app:strokeWidth="3dp" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/card_visualizer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginEnd="70dp"
|
||||
android:layout_marginBottom="24dp"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:stateListAnimator="@null"
|
||||
app:backgroundTint="@color/list_card_background"
|
||||
app:icon="@drawable/ic_music_note_24dp"
|
||||
app:iconTint="@color/icon_default"
|
||||
app:rippleColor="@color/list_card_stroke_background"
|
||||
app:strokeColor="@color/list_card_stroke_background"
|
||||
app:strokeWidth="3dp" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||
android:id="@+id/card_settings"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
<action
|
||||
android:id="@+id/action_map_fragment_to_settings_fragment"
|
||||
app:destination="@id/settings_destination" />
|
||||
<action
|
||||
android:id="@+id/action_map_fragment_to_visualizer_fragment"
|
||||
app:destination="@id/visualizer_destination" />
|
||||
</fragment>
|
||||
|
||||
<!-- SETTINGS -->
|
||||
|
||||
Reference in New Issue
Block a user