Added song count and other quick actions
This commit is contained in:
parent
f11c392b8d
commit
94ce6e86e8
15 changed files with 226 additions and 35 deletions
18
app/src/main/res/drawable/popup_background.xml
Normal file
18
app/src/main/res/drawable/popup_background.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="16dp" />
|
||||
<solid android:color="?attr/colorSurface" />
|
||||
</shape>
|
|
@ -14,32 +14,44 @@
|
|||
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp">
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/playAction"
|
||||
android:layout_width="wrap_content"
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:id="@+id/songCount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/action_play_all"
|
||||
app:backgroundTint="?attr/colorSurface"
|
||||
app:icon="@drawable/ic_play_arrow_white_24dp" />
|
||||
android:textAppearance="@style/TextViewSubtitle1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/shuffleAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/shuffle"
|
||||
app:backgroundTint="?attr/colorSurface"
|
||||
app:icon="@drawable/ic_shuffle_white_24dp" />
|
||||
android:layout_weight="0"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_shuffle_white_24dp"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:tint="@color/black_color" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/sortAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0"
|
||||
android:background="?attr/roundSelector"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_sort_white_24dp"
|
||||
app:tint="?attr/colorControlNormal"
|
||||
tools:tint="@color/black_color" />
|
||||
|
||||
|
||||
</LinearLayout>
|
28
app/src/main/res/menu/menu_grid_options.xml
Normal file
28
app/src/main/res/menu/menu_grid_options.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_grid_size_1"
|
||||
android:title="@string/grid_size_1" />
|
||||
<item
|
||||
android:id="@+id/action_grid_size_2"
|
||||
android:title="@string/grid_size_2" />
|
||||
<item
|
||||
android:id="@+id/action_grid_size_3"
|
||||
android:title="@string/grid_size_3" />
|
||||
<item
|
||||
android:id="@+id/action_grid_size_4"
|
||||
android:title="@string/grid_size_4" />
|
||||
</menu>
|
37
app/src/main/res/menu/menu_song_sort.xml
Normal file
37
app/src/main/res/menu/menu_song_sort.xml
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ Copyright (c) 2020 Hemanth Savarala.
|
||||
~
|
||||
~ Licensed under the GNU General Public License v3
|
||||
~
|
||||
~ This is free software: you can redistribute it and/or modify it under
|
||||
~ the terms of the GNU General Public License as published by
|
||||
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||
~
|
||||
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
~ See the GNU General Public License for more details.
|
||||
-->
|
||||
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_asc"
|
||||
android:title="@string/sort_order_a_z" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_desc"
|
||||
android:title="@string/sort_order_z_a" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_artist"
|
||||
android:title="@string/sort_order_artist" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_album"
|
||||
android:title="@string/sort_order_album" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_date"
|
||||
android:title="@string/sort_order_date" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_year"
|
||||
android:title="@string/sort_order_year" />
|
||||
<item
|
||||
android:id="@+id/action_song_sort_order_composer"
|
||||
android:title="@string/sort_order_composer" />
|
||||
</menu>
|
|
@ -34,5 +34,7 @@
|
|||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<!--Manual setting colors-->
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -34,5 +34,6 @@
|
|||
<!--Manual setting colors-->
|
||||
<item name="colorPrimary">@color/darkColorPrimary</item>
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -31,6 +31,8 @@
|
|||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
|
||||
<item name="android:windowLightNavigationBar">true</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.MaterialComponents.NoActionBar">
|
||||
|
@ -55,6 +57,8 @@
|
|||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<!--Manual setting colors-->
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
@ -76,5 +80,7 @@
|
|||
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="android:windowLightNavigationBar">false</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -307,7 +307,7 @@
|
|||
<string name="grid_size_7">7</string>
|
||||
<string name="grid_size_8">8</string>
|
||||
|
||||
<string name="grid_style_label"><![CDATA[Grids & Style]]></string>
|
||||
<string name="grid_style_label">Grid style</string>
|
||||
|
||||
<string name="hinge">Hinge</string>
|
||||
|
||||
|
@ -827,4 +827,8 @@
|
|||
<string name="retro_music_player">Retro Music Player</string>
|
||||
<string name="pro">Pro</string>
|
||||
<string name="free">Free</string>
|
||||
<plurals name="songCount">
|
||||
<item quantity="one">%d Song</item>
|
||||
<item quantity="other">%d Songs</item>
|
||||
</plurals>
|
||||
</resources>
|
||||
|
|
|
@ -184,4 +184,8 @@
|
|||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<style name="RetroPopupTheme">
|
||||
<item name="android:popupBackground">@drawable/popup_background</item>
|
||||
<item name="android:popupElevation">4dp</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
<item name="roundSelector">@drawable/round_selector</item>
|
||||
<item name="rectSelector">@drawable/rect_selector</item>
|
||||
<item name="android:actionOverflowButtonStyle">@style/Widget.ActionButton.Overflow</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base" parent="Theme.MaterialComponents.NoActionBar">
|
||||
|
@ -41,6 +43,8 @@
|
|||
|
||||
<!--Manual setting colors-->
|
||||
<item name="colorSurface">@color/darkColorSurface</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Black" parent="Theme.MaterialComponents.NoActionBar">
|
||||
|
@ -61,6 +65,8 @@
|
|||
<item name="colorOnBackground">@color/blackColorSurface</item>
|
||||
<item name="toolbarPopupTheme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="mcab_popup_theme">@style/ThemeOverlay.AppCompat.Dark</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.RetroMusic.Base.Light" parent="Theme.MaterialComponents.Light.NoActionBar">
|
||||
|
@ -81,6 +87,8 @@
|
|||
<item name="windowActionBar">false</item>
|
||||
<item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
|
||||
<item name="materialButtonStyle">@style/MaterialButtonTheme</item>
|
||||
<item name="popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
<item name="android:popupMenuStyle">@style/RetroPopupTheme</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue