├── .github
└── ISSUE_TEMPLATE
│ ├── 💻-feature-request.md
│ └── 🪰-bug-report.md
├── .gitignore
├── .idea
├── .gitignore
├── .name
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── compiler.xml
├── deploymentTargetDropDown.xml
├── discord.xml
├── gradle.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── kotlinc.xml
├── misc.xml
└── vcs.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
├── release
│ ├── SimpleMP-BETA-1.8.0.apk
│ └── output-metadata.json
├── schemas
│ └── com.lighttigerxiv.simple.mp.compose.data.AppDatabase
│ │ ├── 2.json
│ │ ├── 3.json
│ │ └── 4.json
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── lighttigerxiv
│ │ └── simple
│ │ └── mp
│ │ └── compose
│ │ └── ExampleInstrumentedTest.kt
│ ├── debug
│ ├── ic_launcher-playstore.png
│ └── res
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ └── ic_launcher_background.xml
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-playstore.png
│ ├── java
│ │ └── com
│ │ │ └── lighttigerxiv
│ │ │ └── simple
│ │ │ └── mp
│ │ │ └── compose
│ │ │ ├── AndroidAutoDetector.kt
│ │ │ ├── activities
│ │ │ ├── main
│ │ │ │ ├── ActivityMain.kt
│ │ │ │ └── MainVM.kt
│ │ │ └── setup
│ │ │ │ └── ActivitySetup.kt
│ │ │ ├── data
│ │ │ ├── data_classes
│ │ │ │ ├── Album.kt
│ │ │ │ ├── Artist.kt
│ │ │ │ ├── Song.kt
│ │ │ │ ├── SongCover.kt
│ │ │ │ └── SongsData.kt
│ │ │ ├── mongodb
│ │ │ │ ├── MongoRealm.kt
│ │ │ │ ├── items
│ │ │ │ │ ├── Artist.kt
│ │ │ │ │ ├── CachedAlbum.kt
│ │ │ │ │ ├── CachedArtist.kt
│ │ │ │ │ ├── CachedSong.kt
│ │ │ │ │ └── Playlist.kt
│ │ │ │ └── queries
│ │ │ │ │ ├── ArtistsCoversQueries.kt
│ │ │ │ │ ├── CacheQueries.kt
│ │ │ │ │ └── PlaylistsQueries.kt
│ │ │ ├── responses
│ │ │ │ └── DiscogsResponse.kt
│ │ │ ├── variables
│ │ │ │ └── Constants.kt
│ │ │ └── workers
│ │ │ │ └── SyncSongsWorker.kt
│ │ │ ├── functions
│ │ │ ├── Functions.kt
│ │ │ └── Permissions.kt
│ │ │ ├── navigation
│ │ │ ├── BottomNavItem.kt
│ │ │ └── BottomNavigationBar.kt
│ │ │ ├── others
│ │ │ └── lucky
│ │ │ ├── retrofit
│ │ │ └── Retrofit.kt
│ │ │ ├── screens
│ │ │ ├── main
│ │ │ │ ├── about
│ │ │ │ │ └── AboutScreen.kt
│ │ │ │ ├── add_song_to_playlist
│ │ │ │ │ ├── AddSongToPlaylistScreen.kt
│ │ │ │ │ └── AddSongToPlaylistScreenVM.kt
│ │ │ │ ├── albums
│ │ │ │ │ ├── AlbumsScreen.kt
│ │ │ │ │ ├── AlbumsScreenVM.kt
│ │ │ │ │ └── album
│ │ │ │ │ │ ├── AlbumScreen.kt
│ │ │ │ │ │ └── AlbumScreenVM.kt
│ │ │ │ ├── artist
│ │ │ │ │ ├── ArtistScreen.kt
│ │ │ │ │ ├── ArtistScreenVM.kt
│ │ │ │ │ ├── artist_album
│ │ │ │ │ │ ├── ArtistAlbumScreen.kt
│ │ │ │ │ │ └── ArtistAlbumScreenVM.kt
│ │ │ │ │ └── artist_select_cover
│ │ │ │ │ │ ├── SelectArtistCoverScreen.kt
│ │ │ │ │ │ └── SelectArtistCoverScreenVM.kt
│ │ │ │ ├── artists
│ │ │ │ │ ├── ArtistsScreen.kt
│ │ │ │ │ └── ArtistsScreenVM.kt
│ │ │ │ ├── floating_album
│ │ │ │ │ ├── FloatingAlbumScreen.kt
│ │ │ │ │ └── FloatingAlbumScreenVM.kt
│ │ │ │ ├── floating_artist
│ │ │ │ │ ├── FloatingArtistScreen.kt
│ │ │ │ │ └── FloatingArtistScreenVM.kt
│ │ │ │ ├── home
│ │ │ │ │ ├── HomeScreen.kt
│ │ │ │ │ └── HomeScreenVM.kt
│ │ │ │ ├── main
│ │ │ │ │ └── MainScreen.kt
│ │ │ │ ├── player
│ │ │ │ │ ├── PlayerScreen.kt
│ │ │ │ │ └── PlayerScreenVM.kt
│ │ │ │ ├── playlists
│ │ │ │ │ ├── PlaylistsScreen.kt
│ │ │ │ │ ├── PlaylistsScreenVM.kt
│ │ │ │ │ ├── genre_playlists
│ │ │ │ │ │ └── GenrePlaylistScreen.kt
│ │ │ │ │ └── playlist
│ │ │ │ │ │ ├── PlaylistScreen.kt
│ │ │ │ │ │ ├── PlaylistScreenVM.kt
│ │ │ │ │ │ └── add_songs
│ │ │ │ │ │ ├── AddSongsScreen.kt
│ │ │ │ │ │ └── AddSongsScreenVM.kt
│ │ │ │ └── settings
│ │ │ │ │ ├── SettingsScreen.kt
│ │ │ │ │ ├── SettingsScreenVM.kt
│ │ │ │ │ └── color_schemes
│ │ │ │ │ ├── DarkColorSchemesScreen.kt
│ │ │ │ │ └── LightColorSchemesScreen.kt
│ │ │ └── setup
│ │ │ │ ├── color_schemes
│ │ │ │ ├── dark
│ │ │ │ │ ├── SetupDarkColorSchemesScreen.kt
│ │ │ │ │ └── SetupDarkColorSchemesScreenVM.kt
│ │ │ │ └── light
│ │ │ │ │ ├── SetupLightColorSchemesScreen.kt
│ │ │ │ │ └── SetupLightColorSchemesScreenVM.kt
│ │ │ │ ├── other
│ │ │ │ └── OtherScreen.kt
│ │ │ │ ├── permissions
│ │ │ │ ├── PermissionsScreen.kt
│ │ │ │ └── PermissionsScreenVM.kt
│ │ │ │ └── welcome
│ │ │ │ └── WelcomeScreen.kt
│ │ │ ├── services
│ │ │ ├── ActionsService.kt
│ │ │ ├── ReceiverOpenApp.kt
│ │ │ ├── ReceiverPlayPause.kt
│ │ │ ├── ReceiverPreviousSong.kt
│ │ │ ├── ReceiverSkipSong.kt
│ │ │ ├── ReceiverStop.kt
│ │ │ └── SimpleMPService.kt
│ │ │ ├── settings
│ │ │ └── SettingsVM.kt
│ │ │ ├── ui
│ │ │ ├── composables
│ │ │ │ ├── BottomSheetHandle.kt
│ │ │ │ ├── CustomTextField.kt
│ │ │ │ ├── Icons.kt
│ │ │ │ ├── ImageCard.kt
│ │ │ │ ├── MiniPlayer.kt
│ │ │ │ ├── PlayAndShuffleRow.kt
│ │ │ │ ├── SheetDraggingBar.kt
│ │ │ │ ├── SongItem.kt
│ │ │ │ ├── Text.kt
│ │ │ │ ├── ThemeSelector.kt
│ │ │ │ ├── Toolbars.kt
│ │ │ │ ├── spacers
│ │ │ │ │ ├── MediumHorizontalSpacer.kt
│ │ │ │ │ ├── MediumVerticalSpacer.kt
│ │ │ │ │ ├── SmallHorizontalSpacer.kt
│ │ │ │ │ ├── SmallVerticalSpacer.kt
│ │ │ │ │ ├── XSmallHeightSpacer.kt
│ │ │ │ │ └── XSmallWidthSpacer.kt
│ │ │ │ └── text
│ │ │ │ │ └── TitleMedium.kt
│ │ │ └── theme
│ │ │ │ ├── Color.kt
│ │ │ │ ├── Shape.kt
│ │ │ │ ├── Theme.kt
│ │ │ │ └── Type.kt
│ │ │ └── widgets
│ │ │ └── SimpleMPWidget.kt
│ └── res
│ │ ├── drawable-nodpi
│ │ └── example_appwidget_preview.png
│ │ ├── drawable-v21
│ │ └── app_widget_inner_view_background.xml
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable-v31
│ │ └── app_widget_background.xml
│ │ ├── drawable
│ │ ├── alphabetic_sort.xml
│ │ ├── app_widget_background.xml
│ │ ├── back.xml
│ │ ├── brush.xml
│ │ ├── brush_filled.xml
│ │ ├── car.xml
│ │ ├── cd.xml
│ │ ├── cd_filled.xml
│ │ ├── check.xml
│ │ ├── close.xml
│ │ ├── close_notification.xml
│ │ ├── colorscheme.xml
│ │ ├── date_sort.xml
│ │ ├── demons.jpg
│ │ ├── drag.xml
│ │ ├── filter.xml
│ │ ├── folder.xml
│ │ ├── github.xml
│ │ ├── home.xml
│ │ ├── home_filled.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_launcher_foreground.xml
│ │ ├── icon_about_regular.xml
│ │ ├── icon_arrow_down_solid.xml
│ │ ├── icon_arrow_up_solid.xml
│ │ ├── icon_database.xml
│ │ ├── icon_fdroid.xml
│ │ ├── icon_pause_round_solid.xml
│ │ ├── icon_play_round_solid.xml
│ │ ├── icon_play_store.xml
│ │ ├── icon_plus_solid.xml
│ │ ├── info.xml
│ │ ├── list.xml
│ │ ├── list_filled.xml
│ │ ├── loading.xml
│ │ ├── menu.xml
│ │ ├── moon.xml
│ │ ├── mtrl_popupmenu_background_overlay.xml
│ │ ├── music_note.xml
│ │ ├── next.xml
│ │ ├── next_notification.xml
│ │ ├── other_filled.xml
│ │ ├── pause.xml
│ │ ├── pause_notification.xml
│ │ ├── person.xml
│ │ ├── person_filled.xml
│ │ ├── play.xml
│ │ ├── play_empty.xml
│ │ ├── play_notification.xml
│ │ ├── playlist.xml
│ │ ├── playlist_filled.xml
│ │ ├── plus.xml
│ │ ├── previous.xml
│ │ ├── previous_notification.xml
│ │ ├── queue_list.xml
│ │ ├── reload.xml
│ │ ├── remove.xml
│ │ ├── repeat.xml
│ │ ├── round_widget_image.xml
│ │ ├── save.xml
│ │ ├── select.xml
│ │ ├── settings.xml
│ │ ├── shuffle.xml
│ │ ├── smartphone.xml
│ │ ├── sort.xml
│ │ ├── trash.xml
│ │ ├── vertical_three_dots.xml
│ │ └── widget_preview_below_12.png
│ │ ├── layout-v31
│ │ ├── simple_m_p_disabled_widget.xml
│ │ └── simple_m_p_widget.xml
│ │ ├── layout
│ │ ├── simple_m_p_disabled_widget.xml
│ │ └── simple_m_p_widget.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_background.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── raw
│ │ ├── hide_navbar_motion.json5
│ │ └── player_visibility.json5
│ │ ├── values-de
│ │ └── strings.xml
│ │ ├── values-night
│ │ └── colors.xml
│ │ ├── values-pt
│ │ └── strings.xml
│ │ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ids.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ ├── xml-v31
│ │ └── simple_m_p_widget_info.xml
│ │ └── xml
│ │ ├── backup_rules.xml
│ │ ├── data_extraction_rules.xml
│ │ └── simple_m_p_widget_info.xml
│ ├── release
│ ├── ic_launcher-playstore.png
│ └── res
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ └── ic_launcher_background.xml
│ └── test
│ └── java
│ └── com
│ └── lighttigerxiv
│ └── simple
│ └── mp
│ └── compose
│ └── ExampleUnitTest.kt
├── build.gradle
├── fastlane
├── .gitkeep
└── metadata
│ └── android
│ └── en-US
│ ├── .gitkeep
│ ├── changelogs
│ └── 3.txt
│ ├── full_description.txt
│ ├── images
│ ├── featureGraphic.png
│ ├── icon.png
│ └── phoneScreenshots
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ ├── 7.png
│ │ └── 8.png
│ ├── short_description.txt
│ └── title.txt
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.github/ISSUE_TEMPLATE/💻-feature-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001F4BB Feature Request"
3 | about: A template to use when requesting a feature
4 | title: "[FEATURE] - "
5 | labels: Feature
6 | assignees: lighttigerXIV
7 |
8 | ---
9 |
10 | # What feature would you like to be added?
11 | *Talk about the feature here*
12 |
13 | # Why should it be added?
14 | *Why?* 🤷🏻♂️
15 |
16 | # Examples
17 | *You can send screenshots or links for other apps that have the same feature as a example*
18 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/🪰-bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: "\U0001FAB0 Bug Report"
3 | about: A template to use when reporting bugs
4 | title: "[BUG] - "
5 | labels: Bug
6 | assignees: lighttigerXIV
7 |
8 | ---
9 |
10 | # App Version
11 | SimpleMP-Beta-X.X.X
12 |
13 | # Bug
14 | *Add your bug here*
15 |
16 | # Expected Behaviour
17 | *Add expected behaviour here*
18 |
19 | # Makes the the app crash
20 | - [ ] Yes
21 | - [x] No
22 |
23 | # Screenshots/Videos
24 | *Insert your screenshots here ( if needed )*
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | .DS_Store
11 | /build
12 | /captures
13 | .externalNativeBuild
14 | .cxx
15 | local.properties
16 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | Compose - SimpleMP
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetDropDown.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/discord.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 lighttigerXIV
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Simple MP
4 |
5 |
6 | ⚠️ The app development will be on a hiatus until i get motivation and time (a lot of UNI work 🙄) to work on it.
7 | Thanks for everyone that helped me work on the project. This is not a goodbye but a see you soon :P
8 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | -keepattributes Signature
2 | -keepattributes Exceptions
3 |
4 | -keep class com.lighttigerxiv.simple.mp.compose.data.** { *; }
5 | -keep class com.lighttigerxiv.simple.mp.compose.responses.** { *; }
6 |
7 | -dontwarn org.bouncycastle.jsse.BCSSLParameters
8 | -dontwarn org.bouncycastle.jsse.BCSSLSocket
9 | -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
10 | -dontwarn org.conscrypt.Conscrypt$Version
11 | -dontwarn org.conscrypt.Conscrypt
12 | -dontwarn org.conscrypt.ConscryptHostnameVerifier
13 | -dontwarn org.openjsse.javax.net.ssl.SSLParameters
14 | -dontwarn org.openjsse.javax.net.ssl.SSLSocket
15 | -dontwarn org.openjsse.net.ssl.OpenJSSE
--------------------------------------------------------------------------------
/app/release/SimpleMP-BETA-1.8.0.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/release/SimpleMP-BETA-1.8.0.apk
--------------------------------------------------------------------------------
/app/release/output-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "artifactType": {
4 | "type": "APK",
5 | "kind": "Directory"
6 | },
7 | "applicationId": "com.lighttigerxiv.simple.mp",
8 | "variantName": "release",
9 | "elements": [
10 | {
11 | "type": "SINGLE",
12 | "filters": [],
13 | "attributes": [],
14 | "versionCode": 22,
15 | "versionName": "BETA-1.8.0",
16 | "outputFile": "app-release.apk"
17 | }
18 | ],
19 | "elementType": "File"
20 | }
--------------------------------------------------------------------------------
/app/schemas/com.lighttigerxiv.simple.mp.compose.data.AppDatabase/2.json:
--------------------------------------------------------------------------------
1 | {
2 | "formatVersion": 1,
3 | "database": {
4 | "version": 2,
5 | "identityHash": "4b92e690520845e4fb2f773f5e427ce5",
6 | "entities": [
7 | {
8 | "tableName": "Playlist",
9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `image` TEXT, `songs` TEXT)",
10 | "fields": [
11 | {
12 | "fieldPath": "id",
13 | "columnName": "id",
14 | "affinity": "INTEGER",
15 | "notNull": true
16 | },
17 | {
18 | "fieldPath": "name",
19 | "columnName": "name",
20 | "affinity": "TEXT",
21 | "notNull": true
22 | },
23 | {
24 | "fieldPath": "image",
25 | "columnName": "image",
26 | "affinity": "TEXT",
27 | "notNull": false
28 | },
29 | {
30 | "fieldPath": "songs",
31 | "columnName": "songs",
32 | "affinity": "TEXT",
33 | "notNull": false
34 | }
35 | ],
36 | "primaryKey": {
37 | "columnNames": [
38 | "id"
39 | ],
40 | "autoGenerate": true
41 | },
42 | "indices": [],
43 | "foreignKeys": []
44 | }
45 | ],
46 | "views": [],
47 | "setupQueries": [
48 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
49 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '4b92e690520845e4fb2f773f5e427ce5')"
50 | ]
51 | }
52 | }
--------------------------------------------------------------------------------
/app/schemas/com.lighttigerxiv.simple.mp.compose.data.AppDatabase/3.json:
--------------------------------------------------------------------------------
1 | {
2 | "formatVersion": 1,
3 | "database": {
4 | "version": 3,
5 | "identityHash": "702ceab2a1ebdd777fbfd26a70851ffe",
6 | "entities": [
7 | {
8 | "tableName": "Playlist",
9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `image` TEXT)",
10 | "fields": [
11 | {
12 | "fieldPath": "id",
13 | "columnName": "id",
14 | "affinity": "INTEGER",
15 | "notNull": true
16 | },
17 | {
18 | "fieldPath": "name",
19 | "columnName": "name",
20 | "affinity": "TEXT",
21 | "notNull": true
22 | },
23 | {
24 | "fieldPath": "image",
25 | "columnName": "image",
26 | "affinity": "TEXT",
27 | "notNull": false
28 | }
29 | ],
30 | "primaryKey": {
31 | "columnNames": [
32 | "id"
33 | ],
34 | "autoGenerate": true
35 | },
36 | "indices": [],
37 | "foreignKeys": []
38 | },
39 | {
40 | "tableName": "Artist",
41 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `image` TEXT, `alreadyRequested` INTEGER NOT NULL, PRIMARY KEY(`id`))",
42 | "fields": [
43 | {
44 | "fieldPath": "id",
45 | "columnName": "id",
46 | "affinity": "INTEGER",
47 | "notNull": true
48 | },
49 | {
50 | "fieldPath": "image",
51 | "columnName": "image",
52 | "affinity": "TEXT",
53 | "notNull": false
54 | },
55 | {
56 | "fieldPath": "alreadyRequested",
57 | "columnName": "alreadyRequested",
58 | "affinity": "INTEGER",
59 | "notNull": true
60 | }
61 | ],
62 | "primaryKey": {
63 | "columnNames": [
64 | "id"
65 | ],
66 | "autoGenerate": false
67 | },
68 | "indices": [],
69 | "foreignKeys": []
70 | }
71 | ],
72 | "views": [],
73 | "setupQueries": [
74 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
75 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '702ceab2a1ebdd777fbfd26a70851ffe')"
76 | ]
77 | }
78 | }
--------------------------------------------------------------------------------
/app/schemas/com.lighttigerxiv.simple.mp.compose.data.AppDatabase/4.json:
--------------------------------------------------------------------------------
1 | {
2 | "formatVersion": 1,
3 | "database": {
4 | "version": 4,
5 | "identityHash": "6656bc6f863cd210d2bc202974b1dc87",
6 | "entities": [
7 | {
8 | "tableName": "Playlist",
9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `image` TEXT)",
10 | "fields": [
11 | {
12 | "fieldPath": "id",
13 | "columnName": "id",
14 | "affinity": "INTEGER",
15 | "notNull": true
16 | },
17 | {
18 | "fieldPath": "name",
19 | "columnName": "name",
20 | "affinity": "TEXT",
21 | "notNull": true
22 | },
23 | {
24 | "fieldPath": "image",
25 | "columnName": "image",
26 | "affinity": "TEXT",
27 | "notNull": false
28 | }
29 | ],
30 | "primaryKey": {
31 | "columnNames": [
32 | "id"
33 | ],
34 | "autoGenerate": true
35 | },
36 | "indices": [],
37 | "foreignKeys": []
38 | },
39 | {
40 | "tableName": "Artist",
41 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `image` TEXT, `alreadyRequested` INTEGER NOT NULL, PRIMARY KEY(`id`))",
42 | "fields": [
43 | {
44 | "fieldPath": "id",
45 | "columnName": "id",
46 | "affinity": "INTEGER",
47 | "notNull": true
48 | },
49 | {
50 | "fieldPath": "image",
51 | "columnName": "image",
52 | "affinity": "TEXT",
53 | "notNull": false
54 | },
55 | {
56 | "fieldPath": "alreadyRequested",
57 | "columnName": "alreadyRequested",
58 | "affinity": "INTEGER",
59 | "notNull": true
60 | }
61 | ],
62 | "primaryKey": {
63 | "columnNames": [
64 | "id"
65 | ],
66 | "autoGenerate": false
67 | },
68 | "indices": [],
69 | "foreignKeys": []
70 | },
71 | {
72 | "tableName": "PlaylistSong",
73 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `playlist_id` INTEGER NOT NULL, `song_id` INTEGER NOT NULL, FOREIGN KEY(`playlist_id`) REFERENCES `Playlist`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
74 | "fields": [
75 | {
76 | "fieldPath": "id",
77 | "columnName": "id",
78 | "affinity": "INTEGER",
79 | "notNull": true
80 | },
81 | {
82 | "fieldPath": "playlist_id",
83 | "columnName": "playlist_id",
84 | "affinity": "INTEGER",
85 | "notNull": true
86 | },
87 | {
88 | "fieldPath": "song_id",
89 | "columnName": "song_id",
90 | "affinity": "INTEGER",
91 | "notNull": true
92 | }
93 | ],
94 | "primaryKey": {
95 | "columnNames": [
96 | "id"
97 | ],
98 | "autoGenerate": true
99 | },
100 | "indices": [],
101 | "foreignKeys": [
102 | {
103 | "table": "Playlist",
104 | "onDelete": "CASCADE",
105 | "onUpdate": "NO ACTION",
106 | "columns": [
107 | "playlist_id"
108 | ],
109 | "referencedColumns": [
110 | "id"
111 | ]
112 | }
113 | ]
114 | }
115 | ],
116 | "views": [],
117 | "setupQueries": [
118 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
119 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '6656bc6f863cd210d2bc202974b1dc87')"
120 | ]
121 | }
122 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/lighttigerxiv/simple/mp/compose/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose
2 |
3 | import androidx.test.platform.app.InstrumentationRegistry
4 | import androidx.test.ext.junit.runners.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22 | assertEquals("com.lighttigerxiv.simple.mp.compose", appContext.packageName)
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/debug/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #1E1E2E
4 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
25 |
28 |
29 |
30 |
31 |
32 |
35 |
36 |
37 |
40 |
43 |
44 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/AndroidAutoDetector.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose
2 |
3 | import android.annotation.SuppressLint
4 | import android.content.AsyncQueryHandler
5 | import android.content.BroadcastReceiver
6 | import android.content.ContentResolver
7 | import android.content.Context
8 | import android.content.Intent
9 | import android.content.IntentFilter
10 | import android.database.Cursor
11 | import android.net.Uri
12 | import androidx.core.content.ContextCompat
13 |
14 |
15 | class AndroidAutoDetector(val context: Context) {
16 |
17 | var onDisconnect: () -> Unit = {}
18 |
19 | companion object {
20 | const val TAG = "AutoConnectionDetector"
21 |
22 | // columnName for provider to query on connection status
23 | const val CAR_CONNECTION_STATE = "CarConnectionState"
24 |
25 | // auto app on your phone will send broadcast with this action when connection state changes
26 | const val ACTION_CAR_CONNECTION_UPDATED = "androidx.car.app.connection.action.CAR_CONNECTION_UPDATED"
27 |
28 | // phone is not connected to car
29 | const val CONNECTION_TYPE_NOT_CONNECTED = 0
30 |
31 | // phone is connected to Automotive OS
32 | const val CONNECTION_TYPE_NATIVE = 1
33 |
34 | // phone is connected to Android Auto
35 | const val CONNECTION_TYPE_PROJECTION = 2
36 |
37 | private const val QUERY_TOKEN = 42
38 |
39 | private const val CAR_CONNECTION_AUTHORITY = "androidx.car.app.connection"
40 |
41 | private val PROJECTION_HOST_URI = Uri.Builder().scheme("content").authority(CAR_CONNECTION_AUTHORITY).build()
42 | }
43 |
44 | private val carConnectionReceiver = CarConnectionBroadcastReceiver()
45 | private val carConnectionQueryHandler = CarConnectionQueryHandler(context.contentResolver)
46 |
47 |
48 | fun registerCarConnectionReceiver() {
49 |
50 | ContextCompat.registerReceiver(context, carConnectionReceiver, IntentFilter(ACTION_CAR_CONNECTION_UPDATED), ContextCompat.RECEIVER_NOT_EXPORTED)
51 | queryForState()
52 | }
53 |
54 | fun unRegisterCarConnectionReceiver() {
55 | context.unregisterReceiver(carConnectionReceiver)
56 | }
57 |
58 | private fun queryForState() {
59 | carConnectionQueryHandler.startQuery(
60 | QUERY_TOKEN,
61 | null,
62 | PROJECTION_HOST_URI,
63 | arrayOf(CAR_CONNECTION_STATE),
64 | null,
65 | null,
66 | null
67 | )
68 | }
69 |
70 | inner class CarConnectionBroadcastReceiver : BroadcastReceiver() {
71 | // query for connection state every time the receiver receives the broadcast
72 | override fun onReceive(context: Context?, intent: Intent?) {
73 | queryForState()
74 | }
75 | }
76 |
77 | internal class CarConnectionQueryHandler(resolver: ContentResolver?) : AsyncQueryHandler(resolver) {
78 | // notify new queryed connection status when query complete
79 | override fun onQueryComplete(token: Int, cookie: Any?, response: Cursor?) {
80 | if (response == null) {
81 |
82 | return
83 | }
84 | val carConnectionTypeColumn = response.getColumnIndex(CAR_CONNECTION_STATE)
85 | if (carConnectionTypeColumn < 0) {
86 |
87 | return
88 | }
89 | if (!response.moveToNext()) {
90 |
91 | return
92 | }
93 | val connectionState = response.getInt(carConnectionTypeColumn)
94 | if (connectionState == CONNECTION_TYPE_NOT_CONNECTED) {
95 |
96 | } else {
97 |
98 | }
99 | }
100 | }
101 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/data_classes/Album.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.data_classes
2 |
3 | import android.graphics.Bitmap
4 |
5 | data class Album(
6 | val id: Long,
7 | val title: String,
8 | val art: Bitmap?,
9 | val artistID: Long
10 | )
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/data_classes/Artist.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.data_classes
2 |
3 | import android.graphics.Bitmap
4 |
5 | data class Artist(
6 | val id: Long,
7 | val name: String,
8 | val cover: Bitmap?
9 | )
10 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/data_classes/Song.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.data_classes
2 |
3 | data class Song(
4 |
5 | val id: Long,
6 | var path: String,
7 | val title: String,
8 | val albumID: Long,
9 | val duration: Int,
10 | val artistID: Long,
11 | val year: Int,
12 | val genre: String,
13 | val modificationDate: Long,
14 | var selected: Boolean = false
15 | )
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/data_classes/SongCover.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.data_classes
2 |
3 | import android.graphics.Bitmap
4 |
5 | data class SongCover(
6 | val albumID: Long,
7 | val albumArt: Bitmap?
8 | )
9 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/data_classes/SongsData.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.data_classes
2 |
3 | data class SongsData(
4 | val songs: List,
5 | val artists: List,
6 | val albums: List
7 | )
8 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/MongoRealm.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb
2 |
3 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.Artist
4 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedAlbum
5 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedArtist
6 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedSong
7 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.Playlist
8 | import io.realm.kotlin.Realm
9 | import io.realm.kotlin.RealmConfiguration
10 |
11 |
12 | fun getMongoRealm(): Realm{
13 | val config = RealmConfiguration.Builder(
14 | schema = setOf(
15 | Playlist::class,
16 | Artist::class,
17 | CachedAlbum::class,
18 | CachedArtist::class,
19 | CachedSong::class
20 | )
21 | )
22 | .schemaVersion(9)
23 | .compactOnLaunch()
24 | .build()
25 |
26 | return Realm.open(config)
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/items/Artist.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("PropertyName")
2 |
3 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.items
4 |
5 | import io.realm.kotlin.types.RealmObject
6 | import io.realm.kotlin.types.annotations.PrimaryKey
7 |
8 |
9 | class Artist: RealmObject{
10 |
11 | @PrimaryKey
12 | var artistID: Long = 0
13 | var image: String? = null
14 | var alreadyRequested : Boolean = false
15 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/items/CachedAlbum.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.items
2 |
3 | import io.realm.kotlin.types.RealmObject
4 | import io.realm.kotlin.types.annotations.PrimaryKey
5 |
6 | class CachedAlbum: RealmObject {
7 | @PrimaryKey
8 | var id: Long = 0
9 | var title: String = ""
10 | var artistID: Long = 0
11 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/items/CachedArtist.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.items
2 |
3 | import io.realm.kotlin.types.RealmObject
4 | import io.realm.kotlin.types.annotations.PrimaryKey
5 |
6 | class CachedArtist : RealmObject {
7 | @PrimaryKey
8 | var id: Long = 0
9 | var name: String = ""
10 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/items/CachedSong.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.items
2 |
3 | import io.realm.kotlin.types.RealmObject
4 | import io.realm.kotlin.types.annotations.PrimaryKey
5 |
6 | class CachedSong : RealmObject {
7 | @PrimaryKey
8 | var id: Long = 0
9 | var path: String = ""
10 | var title: String = ""
11 | var albumID: Long = 0
12 | var duration: Int = 0
13 | var artistID: Long = 0
14 | var year: Int = 0
15 | var genre: String = ""
16 | var modificationDate: Long = 0
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/items/Playlist.kt:
--------------------------------------------------------------------------------
1 | @file:Suppress("PropertyName")
2 |
3 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.items
4 |
5 | import io.realm.kotlin.ext.toRealmList
6 | import io.realm.kotlin.types.RealmList
7 | import io.realm.kotlin.types.RealmObject
8 | import io.realm.kotlin.types.annotations.PrimaryKey
9 | import org.mongodb.kbson.ObjectId
10 |
11 | class Playlist: RealmObject {
12 |
13 | @PrimaryKey
14 | var _id: ObjectId = ObjectId.invoke()
15 | var name: String = ""
16 | var image: String? = null
17 | var songs: RealmList = ArrayList().toRealmList()
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/queries/ArtistsCoversQueries.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.queries
2 |
3 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.Artist
4 | import io.realm.kotlin.Realm
5 | import io.realm.kotlin.ext.query
6 |
7 | class ArtistsCoversQueries(
8 | private val realm: Realm
9 | ) {
10 |
11 | fun getArtist(artistID: Long): Artist?{
12 |
13 | return realm.query("artistID == $0", artistID).first().find()
14 | }
15 |
16 | fun addArtist(artist: Long){
17 |
18 | realm.writeBlocking {
19 |
20 | this.copyToRealm(Artist().apply {
21 | artistID = artist
22 | image = null
23 | alreadyRequested = false
24 | })
25 | }
26 | }
27 |
28 | suspend fun updateArtistCover(artistID: Long, imageString: String?){
29 |
30 | realm.write {
31 |
32 | val artist = this.query("artistID == $0", artistID).find().first()
33 |
34 | artist.image = imageString
35 | }
36 | }
37 |
38 | suspend fun updateArtistAlreadyRequested(artistID: Long){
39 |
40 | realm.write {
41 |
42 | val artist = this.query("artistID == $0", artistID).find().first()
43 |
44 | artist.alreadyRequested = true
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/queries/CacheQueries.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.queries
2 |
3 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Album
4 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Artist
5 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Song
6 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedAlbum
7 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedArtist
8 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.CachedSong
9 | import io.realm.kotlin.Realm
10 | import io.realm.kotlin.ext.query
11 |
12 | class CacheQueries(
13 | private val realm: Realm
14 | ) {
15 |
16 | fun getSongs(): List{
17 | return realm.query().find()
18 | }
19 |
20 | fun getArtists(): List{
21 | return realm.query().find()
22 | }
23 |
24 | fun getAlbums(): List{
25 | return realm.query().find()
26 | }
27 |
28 | fun addSong(song: Song){
29 |
30 | val cachedSong = CachedSong()
31 | cachedSong.id = song.id
32 | cachedSong.path = song.path
33 | cachedSong.title = song.title
34 | cachedSong.albumID = song.albumID
35 | cachedSong.duration = song.duration
36 | cachedSong.artistID = song.artistID
37 | cachedSong.year = song.year
38 | cachedSong.genre = song.genre
39 | cachedSong.modificationDate = song.modificationDate
40 |
41 | realm.writeBlocking {
42 | this.copyToRealm(cachedSong)
43 | }
44 | }
45 |
46 | fun addArtist(artist: Artist){
47 |
48 | val cachedArtist = CachedArtist()
49 | cachedArtist.id = artist.id
50 | cachedArtist.name = artist.name
51 |
52 | realm.writeBlocking {
53 | this.copyToRealm(cachedArtist)
54 | }
55 | }
56 |
57 | fun addAlbum(album: Album){
58 |
59 | val cachedAlbum = CachedAlbum()
60 | cachedAlbum.id = album.id
61 | cachedAlbum.title = album.title
62 | cachedAlbum.artistID = album.artistID
63 |
64 | realm.writeBlocking {
65 | this.copyToRealm(cachedAlbum)
66 | }
67 | }
68 |
69 | suspend fun clear(){
70 | realm.write {
71 | val songs = this.query().find()
72 | val artists = this.query().find()
73 | val albums = this.query().find()
74 |
75 | delete(songs)
76 | delete(artists)
77 | delete(albums)
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/mongodb/queries/PlaylistsQueries.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.mongodb.queries
2 |
3 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.Playlist
4 | import io.realm.kotlin.Realm
5 | import io.realm.kotlin.ext.query
6 | import io.realm.kotlin.ext.toRealmList
7 | import io.realm.kotlin.query.RealmResults
8 | import org.mongodb.kbson.BsonObjectId
9 |
10 | class PlaylistsQueries(
11 | private val realm: Realm
12 | ) {
13 | private fun String.getMongoID(): BsonObjectId {
14 |
15 | val bsonId = BsonObjectId(this)
16 |
17 | return BsonObjectId(bsonId.toByteArray())
18 | }
19 |
20 | fun getPlaylists(): RealmResults {
21 | return realm.query().find()
22 | }
23 |
24 | fun getPlaylist(playlistID: String): Playlist {
25 |
26 | return realm.query("_id == $0", playlistID.getMongoID()).find().first()
27 | }
28 |
29 | fun createPlaylist(
30 | playlistName: String
31 | ) {
32 |
33 | realm.writeBlocking {
34 | this.copyToRealm(Playlist().apply {
35 | name = playlistName
36 | })
37 | }
38 | }
39 |
40 | suspend fun deletePlaylist(playlistID: String) {
41 |
42 | realm.write {
43 | val playlist = this.query("_id == $0", playlistID.getMongoID()).find().first()
44 |
45 | delete(playlist)
46 | }
47 | }
48 |
49 | suspend fun updatePlaylistSongs(playlist: Playlist, songs: List) {
50 |
51 | realm.write {
52 |
53 | val queryPlaylist = this.query("_id == $0", playlist._id).find().first()
54 |
55 | queryPlaylist.songs = songs.toRealmList()
56 | }
57 | }
58 |
59 | suspend fun updatePlaylist(playlist: Playlist) {
60 |
61 | realm.write {
62 |
63 | val queryPlaylist = this.query("_id == $0", playlist._id).find().first()
64 |
65 | queryPlaylist.name = playlist.name
66 | queryPlaylist.songs = playlist.songs
67 | queryPlaylist.image = playlist.image
68 | }
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/data/responses/DiscogsResponse.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.data.responses
2 |
3 | data class DiscogsResponse(
4 | val pagination: Pagination,
5 | val results: List
6 | ){
7 |
8 | data class Pagination(
9 | val items: Int,
10 | val page: Int,
11 | val pages: Int,
12 | val per_page: Int,
13 | val urls: Urls
14 | ){
15 | data class Urls(
16 | val last: String,
17 | val next: String
18 | )
19 | }
20 |
21 | data class Result(
22 | val cover_image: String,
23 | val id: Int,
24 | val master_id: Any,
25 | val master_url: Any,
26 | val resource_url: String,
27 | val thumb: String,
28 | val title: String,
29 | val type: String,
30 | val uri: String,
31 | val user_data: UserData
32 | ){
33 | data class UserData(
34 | val in_collection: Boolean,
35 | val in_wantlist: Boolean
36 | )
37 | }
38 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/functions/Permissions.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.functions
2 |
3 | import android.Manifest
4 | import android.content.Context
5 | import android.content.pm.PackageManager
6 | import android.os.Build
7 | import androidx.core.content.ContextCompat
8 |
9 | object Permissions {
10 |
11 | fun hasStoragePermission(context: Context): Boolean {
12 | return if (Build.VERSION.SDK_INT >= 33) {
13 | ContextCompat.checkSelfPermission(context, Manifest.permission.READ_MEDIA_AUDIO) == PackageManager.PERMISSION_GRANTED
14 | } else {
15 | ContextCompat.checkSelfPermission(context, Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED
16 | }
17 | }
18 |
19 | fun hasNotificationsPermission(context: Context): Boolean {
20 | return if (Build.VERSION.SDK_INT >= 33) {
21 | ContextCompat.checkSelfPermission(context, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED
22 | } else {
23 | true
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/navigation/BottomNavItem.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.navigation
2 |
3 | import androidx.compose.ui.graphics.ImageBitmap
4 |
5 | data class BottomNavItem(
6 | val name: String,
7 | val route: String,
8 | val activeIcon: ImageBitmap,
9 | val inactiveIcon: ImageBitmap
10 | )
11 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/others/lucky:
--------------------------------------------------------------------------------
1 | Congratulations, you found the lucky cat
2 |
3 | |\---/|
4 | | ,_, |
5 | \_`_/-..----.
6 | ___/ ` ' ,""+ \
7 | (__...' __\ |`.___.';
8 | (_,...'(_,.`__)/'.....+
9 |
10 |
11 | Now it's time to code :P
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/retrofit/Retrofit.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.retrofit
2 |
3 | import okhttp3.OkHttpClient
4 | import okhttp3.logging.HttpLoggingInterceptor
5 | import retrofit2.Call
6 | import retrofit2.Retrofit
7 | import retrofit2.converter.gson.GsonConverterFactory
8 | import retrofit2.converter.scalars.ScalarsConverterFactory
9 | import retrofit2.http.*
10 |
11 | object DiscogsApiBuilder {
12 |
13 | private val logging = HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BASIC)
14 | private val client = OkHttpClient.Builder().addInterceptor(logging).build()
15 |
16 |
17 | private val retrofit = Retrofit.Builder()
18 | .baseUrl("https://api.discogs.com/")
19 | .addConverterFactory(ScalarsConverterFactory.create())
20 | .addConverterFactory(GsonConverterFactory.create())
21 | .client(client)
22 | .build()
23 |
24 | fun buildService(service: Class): T {
25 | return retrofit.create(service)
26 | }
27 | }
28 |
29 | fun getDiscogsRetrofit(): RetrofitRequests {
30 | return DiscogsApiBuilder.buildService(RetrofitRequests::class.java)
31 | }
32 |
33 | interface RetrofitRequests {
34 | @Headers("Content-Type: application/json")
35 | @GET("database/search")
36 | fun getArtistCover(
37 | @Header("Authorization") token: String,
38 | @Query("q") artist: String,
39 | @Query("type") type: String = "artist"
40 | ): Call
41 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/add_song_to_playlist/AddSongToPlaylistScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.add_song_to_playlist
2 |
3 | import android.app.Application
4 | import androidx.lifecycle.AndroidViewModel
5 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.getMongoRealm
6 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.items.Playlist
7 | import com.lighttigerxiv.simple.mp.compose.data.mongodb.queries.PlaylistsQueries
8 | import com.lighttigerxiv.simple.mp.compose.screens.main.playlists.PlaylistsScreenVM
9 | import kotlinx.coroutines.flow.MutableStateFlow
10 | import kotlinx.coroutines.flow.asStateFlow
11 | import kotlinx.coroutines.flow.update
12 |
13 | class AddSongToPlaylistScreenVM(application: Application) : AndroidViewModel(application) {
14 |
15 | //************************************************
16 | // Variables
17 | //************************************************
18 |
19 | val context = application
20 |
21 | private val playlistsQueries = PlaylistsQueries(getMongoRealm())
22 |
23 | private val _screenLoaded = MutableStateFlow(false)
24 | val screenLoaded = _screenLoaded.asStateFlow()
25 |
26 | private val _playlists = MutableStateFlow?>(null)
27 | val playlists = _playlists.asStateFlow()
28 |
29 | private val _playlistNameText = MutableStateFlow("")
30 | val playlistNameText = _playlistNameText.asStateFlow()
31 | fun updatePlaylistNameText(newValue: String) {
32 | _playlistNameText.update { newValue }
33 | }
34 |
35 | //************************************************
36 | // Functions
37 | //************************************************
38 |
39 |
40 | fun loadScreen() {
41 |
42 | _playlists.update { playlistsQueries.getPlaylists() }
43 |
44 | _screenLoaded.update { true }
45 | }
46 |
47 | fun createPlaylist(playlistsVM: PlaylistsScreenVM) {
48 |
49 | playlistsQueries.createPlaylist(playlistNameText.value)
50 |
51 | _playlists.update { playlistsQueries.getPlaylists() }
52 |
53 | _playlistNameText.update { "" }
54 |
55 | playlistsVM.updatePlaylists(playlistsQueries.getPlaylists())
56 |
57 | playlistsVM.updateCurrentPlaylists(playlistsQueries.getPlaylists().filter {
58 | it.name.trim().lowercase().contains(playlistsVM.searchText.value.trim().lowercase())
59 | })
60 | }
61 |
62 | suspend fun addSong(songID: Long, playlist: Playlist, onSuccess: () -> Unit, onError: () -> Unit) {
63 |
64 | val newSongs = ArrayList().apply {
65 | add(songID)
66 | }
67 |
68 |
69 | if (playlist.songs.any { it == songID }) {
70 |
71 | onError()
72 | } else {
73 |
74 | playlist.songs.forEach {
75 | newSongs.add(it)
76 | }
77 |
78 | playlistsQueries.updatePlaylistSongs(playlist, newSongs)
79 |
80 | onSuccess()
81 | }
82 | }
83 |
84 | fun clearScreen() {
85 | _screenLoaded.update { false }
86 | _playlistNameText.update { "" }
87 | }
88 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/albums/album/AlbumScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.albums.album
2 |
3 | import android.app.Application
4 | import android.graphics.Bitmap
5 | import androidx.lifecycle.AndroidViewModel
6 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Song
7 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
8 | import kotlinx.coroutines.flow.MutableStateFlow
9 | import kotlinx.coroutines.flow.asStateFlow
10 | import kotlinx.coroutines.flow.update
11 |
12 | class AlbumScreenVM(application: Application) : AndroidViewModel(application) {
13 |
14 | //************************************************
15 | // Variables
16 | //************************************************
17 |
18 |
19 | val context = application
20 |
21 | private val _screenLoaded = MutableStateFlow(false)
22 | val screenLoaded = _screenLoaded.asStateFlow()
23 |
24 | private val _albumArt = MutableStateFlow(null)
25 | val albumArt = _albumArt.asStateFlow()
26 |
27 | private val _albumTitle = MutableStateFlow("")
28 | val albumTitle = _albumTitle.asStateFlow()
29 |
30 | private val _artistName = MutableStateFlow("")
31 | val artistName = _artistName.asStateFlow()
32 |
33 | private val _albumSongs = MutableStateFlow?>(null)
34 | val albumSongs = _albumSongs.asStateFlow()
35 |
36 |
37 | //************************************************
38 | // Functions
39 | //************************************************
40 |
41 |
42 | fun loadScreen(mainVM: MainVM, albumID: Long) {
43 |
44 | val songsData = mainVM.songsData.value
45 | val songs = songsData?.songs
46 | val albums = songsData?.albums
47 | val artists = songsData?.artists
48 |
49 | if (songs != null && albums != null && artists != null){
50 |
51 | val album = albums.first { it.id == albumID }
52 |
53 | _albumArt.update { album.art }
54 |
55 | _albumSongs.update { songs.filter { it.albumID == albumID } }
56 |
57 | _albumTitle.update { album.title }
58 |
59 | _artistName.update { artists.first { it.id == album.artistID }.name }
60 |
61 | _screenLoaded.update { true }
62 | }
63 | }
64 |
65 | fun clearScreen() {
66 |
67 | _albumArt.update { null }
68 |
69 | _albumTitle.update { "" }
70 |
71 | _artistName.update { "" }
72 |
73 | _albumSongs.update { null }
74 |
75 | _screenLoaded.update { false }
76 | }
77 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/artist/artist_album/ArtistAlbumScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.artist.artist_album
2 |
3 | import android.app.Application
4 | import android.graphics.Bitmap
5 | import androidx.lifecycle.AndroidViewModel
6 | import androidx.lifecycle.viewModelScope
7 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Song
8 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
9 | import kotlinx.coroutines.Dispatchers
10 | import kotlinx.coroutines.flow.MutableStateFlow
11 | import kotlinx.coroutines.flow.asStateFlow
12 | import kotlinx.coroutines.flow.update
13 | import kotlinx.coroutines.launch
14 | import kotlinx.coroutines.withContext
15 |
16 | class ArtistAlbumScreenVM(application: Application) : AndroidViewModel(application) {
17 |
18 | //************************************************
19 | // Variables
20 | //************************************************
21 |
22 |
23 | val context = application
24 |
25 | private val _screenLoaded = MutableStateFlow(false)
26 | val screenLoaded = _screenLoaded.asStateFlow()
27 |
28 | private val _albumArt = MutableStateFlow(null)
29 | val albumArt = _albumArt.asStateFlow()
30 |
31 | private val _albumName = MutableStateFlow("")
32 | val albumName = _albumName.asStateFlow()
33 |
34 | private val _artistName = MutableStateFlow("")
35 | val artistName = _artistName.asStateFlow()
36 |
37 | private val _albumSongs = MutableStateFlow?>(null)
38 | val albumSongs = _albumSongs.asStateFlow()
39 |
40 |
41 | //************************************************
42 | // Functions
43 | //************************************************
44 |
45 |
46 | fun loadScreen(mainVM: MainVM, albumID: Long){
47 |
48 | fun load(){
49 | val songsData = mainVM.songsData.value
50 | val songs = songsData?.songs
51 | val albums = songsData?.albums
52 | val artists = songsData?.artists
53 |
54 | if(songs != null && artists != null && albums != null){
55 |
56 | val album = albums.first { it.id == albumID }
57 |
58 | _albumArt.update { album.art }
59 |
60 | _albumSongs.update { songs.filter { it.albumID == albumID } }
61 |
62 | _albumName.update { album.title }
63 |
64 | _artistName.update { artists.first { it.id == album.artistID }.name }
65 |
66 | _screenLoaded.update { true }
67 | }
68 | }
69 |
70 | viewModelScope.launch {
71 | withContext(Dispatchers.IO){
72 | mainVM.songsData.collect{
73 | load()
74 | }
75 | }
76 | }
77 | }
78 |
79 | fun clearScreen(){
80 |
81 | _albumArt.update { null }
82 |
83 | _albumName.update { "" }
84 |
85 | _artistName.update { "" }
86 |
87 | _albumSongs.update { null }
88 |
89 | _screenLoaded.update { false }
90 | }
91 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/floating_album/FloatingAlbumScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.floating_album
2 |
3 | import android.app.Application
4 | import android.graphics.Bitmap
5 | import androidx.lifecycle.AndroidViewModel
6 | import com.lighttigerxiv.simple.mp.compose.data.data_classes.Song
7 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
8 | import kotlinx.coroutines.flow.MutableStateFlow
9 | import kotlinx.coroutines.flow.asStateFlow
10 | import kotlinx.coroutines.flow.update
11 |
12 | class FloatingAlbumScreenVM(application: Application) : AndroidViewModel(application) {
13 |
14 | //************************************************
15 | // Variables
16 | //************************************************
17 |
18 |
19 | val context = application
20 |
21 | private val _screenLoaded = MutableStateFlow(false)
22 | val screenLoaded = _screenLoaded.asStateFlow()
23 |
24 | private val _albumArt = MutableStateFlow(null)
25 | val albumArt = _albumArt.asStateFlow()
26 |
27 | private val _albumTitle = MutableStateFlow("")
28 | val albumTitle = _albumTitle.asStateFlow()
29 |
30 | private val _artistName = MutableStateFlow("")
31 | val artistName = _artistName.asStateFlow()
32 |
33 | private val _albumSongs = MutableStateFlow?>(null)
34 | val albumSongs = _albumSongs.asStateFlow()
35 |
36 |
37 | //************************************************
38 | // Functions
39 | //************************************************
40 |
41 |
42 | fun loadScreen(mainVM: MainVM, albumID: Long){
43 |
44 | val songsData = mainVM.songsData.value
45 | val songs = songsData?.songs
46 | val artists = songsData?.artists
47 | val albums = songsData?.albums
48 |
49 | if(songs != null && artists != null && albums != null){
50 |
51 | val album = albums.first { it.id == albumID }
52 |
53 | _albumArt.update { album.art }
54 |
55 | _albumSongs.update { songs.filter { it.albumID == albumID } }
56 |
57 | _albumTitle.update { album.title }
58 |
59 | _artistName.update { artists.first { it.id == album.artistID }.name }
60 |
61 | _screenLoaded.update { true }
62 | }
63 | }
64 |
65 | fun clearScreen(){
66 |
67 | _albumArt.update { null }
68 |
69 | _albumTitle.update { "" }
70 |
71 | _artistName.update { "" }
72 |
73 | _albumSongs.update { null }
74 |
75 | _screenLoaded.update { false }
76 | }
77 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/player/PlayerScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.player
2 |
3 | import androidx.lifecycle.ViewModel
4 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
5 | import kotlinx.coroutines.flow.MutableStateFlow
6 | import kotlinx.coroutines.flow.asStateFlow
7 | import kotlinx.coroutines.flow.update
8 |
9 | class PlayerScreenVM() : ViewModel() {
10 |
11 | //************************************************
12 | // Variables
13 | //************************************************
14 |
15 | var mainVM: MainVM? = null
16 |
17 | private val _showMenu = MutableStateFlow(false)
18 | val showMenu = _showMenu.asStateFlow()
19 | fun updateShowMenu(newValue:Boolean) {
20 | _showMenu.update { newValue }
21 | }
22 |
23 | private val _highlightSongTab = MutableStateFlow(true)
24 | val highlightSongTab = _highlightSongTab.asStateFlow()
25 |
26 | private val _highlightQueueTab = MutableStateFlow(false)
27 | val highlightQueueTab = _highlightQueueTab.asStateFlow()
28 |
29 |
30 |
31 | //************************************************
32 | // Functions
33 | //************************************************
34 |
35 | fun highlightTab(tab: String){
36 |
37 | if(tab == "song"){
38 | _highlightSongTab.update { true }
39 | _highlightQueueTab.update { false }
40 | }
41 |
42 | if(tab == "queue"){
43 | _highlightSongTab.update { false }
44 | _highlightQueueTab.update { true }
45 | }
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/settings/SettingsScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.settings
2 |
3 | import android.app.Application
4 | import android.widget.Toast
5 | import androidx.lifecycle.AndroidViewModel
6 | import androidx.lifecycle.viewModelScope
7 | import com.lighttigerxiv.simple.mp.compose.R
8 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
9 | import com.lighttigerxiv.simple.mp.compose.functions.getAppString
10 | import com.lighttigerxiv.simple.mp.compose.settings.SettingsVM
11 | import kotlinx.coroutines.Dispatchers
12 | import kotlinx.coroutines.flow.MutableStateFlow
13 | import kotlinx.coroutines.flow.asStateFlow
14 | import kotlinx.coroutines.flow.update
15 | import kotlinx.coroutines.launch
16 | import kotlinx.coroutines.withContext
17 |
18 | class SettingsScreenVM(application: Application) : AndroidViewModel(application) {
19 |
20 | //************************************************
21 | // Variables
22 | //************************************************
23 |
24 | private val context = application
25 |
26 | private val _screenLoaded = MutableStateFlow(false)
27 | val screenLoaded = _screenLoaded.asStateFlow()
28 |
29 | private val _showThemeModeDialog = MutableStateFlow(false)
30 | val showThemeModeDialog = _showThemeModeDialog.asStateFlow()
31 | fun updateShowThemeModeDialog(newValue: Boolean) {
32 | _showThemeModeDialog.update { newValue }
33 | }
34 |
35 | private val _showDarkModeDialog = MutableStateFlow(false)
36 | val showDarkModeDialog = _showDarkModeDialog.asStateFlow()
37 | fun updateShowDarkModeDialog(newValue: Boolean) {
38 | _showDarkModeDialog.update { newValue }
39 | }
40 |
41 | private val _showFilterAudioDialog = MutableStateFlow(false)
42 | val showFilterAudioDialog = _showFilterAudioDialog.asStateFlow()
43 | fun updateShowFilterAudioDialog(newValue: Boolean) {
44 | _showFilterAudioDialog.update { newValue }
45 | }
46 |
47 |
48 | private val _selectedColorScheme = MutableStateFlow("")
49 | val selectedColorScheme = _selectedColorScheme.asStateFlow()
50 | fun updateSelectedThemeMode(newValue: String) {
51 |
52 | _selectedColorScheme.update { newValue }
53 | }
54 |
55 | private val _selectedDarkMode = MutableStateFlow("")
56 | val selectedDarkMode = _selectedDarkMode.asStateFlow()
57 | fun updateSelectedDarkMode(newValue: String) {
58 | _selectedDarkMode.update { newValue }
59 | }
60 |
61 | private val _filterAudioText = MutableStateFlow("")
62 | val filterAudioText = _filterAudioText.asStateFlow()
63 | fun updateFilterAudioText(newValue: String) {
64 | _filterAudioText.update { newValue }
65 | }
66 |
67 |
68 | //************************************************
69 | // Functions
70 | //************************************************
71 |
72 | fun loadScreen(settingsVM: SettingsVM) {
73 |
74 |
75 | _selectedColorScheme.update { settingsVM.colorSchemeSetting.value }
76 |
77 | _selectedDarkMode.update { settingsVM.darkModeSetting.value }
78 |
79 | _filterAudioText.update { settingsVM.filterAudioSetting.value }
80 |
81 | _screenLoaded.update { true }
82 | }
83 |
84 | fun applyAudioFilterSetting(settingsVM: SettingsVM, mainVM: MainVM) {
85 |
86 | settingsVM.updateFilterAudioSetting(filterAudioText.value)
87 |
88 | Toast.makeText(context, getAppString(context, R.string.IndexingSongs), Toast.LENGTH_LONG).show()
89 |
90 | viewModelScope.launch {
91 | withContext(Dispatchers.IO) {
92 |
93 | _showFilterAudioDialog.update { false }
94 | mainVM.indexSongs(showNotification = true)
95 | }
96 | }
97 | }
98 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/settings/color_schemes/DarkColorSchemesScreen.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.settings.color_schemes
2 |
3 | import androidx.compose.foundation.*
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.runtime.collectAsState
7 | import androidx.compose.runtime.remember
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.platform.LocalContext
10 | import com.lighttigerxiv.simple.mp.compose.R
11 | import com.lighttigerxiv.simple.mp.compose.data.variables.SCREEN_PADDING
12 | import com.lighttigerxiv.simple.mp.compose.ui.composables.CustomToolbar
13 | import com.lighttigerxiv.simple.mp.compose.ui.composables.ThemeSelector
14 | import com.lighttigerxiv.simple.mp.compose.functions.getAppString
15 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
16 | import com.lighttigerxiv.simple.mp.compose.settings.SettingsVM
17 | import com.lighttigerxiv.simple.mp.compose.ui.composables.spacers.MediumVerticalSpacer
18 |
19 | @Composable
20 | fun DarkColorSchemesScreen(
21 | mainVM: MainVM,
22 | settingsVM: SettingsVM,
23 | onBackClick: () -> Unit
24 | ) {
25 |
26 | val context = LocalContext.current
27 | val themeAccent = settingsVM.darkColorSchemeSetting.collectAsState().value
28 |
29 |
30 | Column(
31 | modifier = Modifier
32 | .fillMaxSize()
33 | .background(mainVM.surfaceColor.collectAsState().value)
34 | .padding(SCREEN_PADDING)
35 | ) {
36 |
37 | CustomToolbar(
38 | backText = remember { getAppString(context, R.string.Settings) },
39 | onBackClick = { onBackClick() }
40 | )
41 |
42 | MediumVerticalSpacer()
43 |
44 | Column(
45 | modifier = Modifier
46 | .fillMaxWidth()
47 | .fillMaxHeight()
48 | .weight(1f, fill = true)
49 | .verticalScroll(rememberScrollState())
50 | ) {
51 |
52 | ThemeSelector(
53 | selectedTheme = themeAccent,
54 | onClick = {
55 | settingsVM.updateDarkColorSchemeSetting(it)
56 | }
57 | )
58 | }
59 | }
60 | }
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/main/settings/color_schemes/LightColorSchemesScreen.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.main.settings.color_schemes
2 |
3 | import androidx.compose.foundation.*
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.runtime.collectAsState
7 | import androidx.compose.runtime.remember
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.platform.LocalContext
10 | import com.lighttigerxiv.simple.mp.compose.R
11 | import com.lighttigerxiv.simple.mp.compose.data.variables.SCREEN_PADDING
12 | import com.lighttigerxiv.simple.mp.compose.ui.composables.CustomToolbar
13 | import com.lighttigerxiv.simple.mp.compose.ui.composables.ThemeSelector
14 | import com.lighttigerxiv.simple.mp.compose.functions.getAppString
15 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainVM
16 | import com.lighttigerxiv.simple.mp.compose.settings.SettingsVM
17 | import com.lighttigerxiv.simple.mp.compose.ui.composables.spacers.MediumVerticalSpacer
18 |
19 | @Composable
20 | fun LightColorSchemesScreen(
21 | mainVM: MainVM,
22 | settingsVM: SettingsVM,
23 | onBackClick: () -> Unit
24 | ) {
25 |
26 | val context = LocalContext.current
27 | val themeAccent = settingsVM.lightColorSchemeSetting.collectAsState().value
28 |
29 |
30 | Column(
31 | modifier = Modifier
32 | .fillMaxSize()
33 | .background(mainVM.surfaceColor.collectAsState().value)
34 | .padding(SCREEN_PADDING)
35 | ) {
36 |
37 | CustomToolbar(
38 | backText = remember { getAppString(context, R.string.Settings) },
39 | onBackClick = { onBackClick() }
40 | )
41 |
42 | MediumVerticalSpacer()
43 |
44 | Column(
45 | modifier = Modifier
46 | .fillMaxWidth()
47 | .fillMaxHeight()
48 | .weight(1f, fill = true)
49 | .verticalScroll(rememberScrollState())
50 | ) {
51 |
52 | ThemeSelector(
53 | selectedTheme = themeAccent,
54 | onClick = {
55 | settingsVM.updateLightColorSchemeSetting(it)
56 | }
57 | )
58 | }
59 | }
60 | }
61 |
62 |
63 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/setup/color_schemes/dark/SetupDarkColorSchemesScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.setup.color_schemes.dark
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import androidx.lifecycle.AndroidViewModel
6 | import com.lighttigerxiv.simple.mp.compose.data.variables.Settings
7 | import com.lighttigerxiv.simple.mp.compose.settings.SettingsVM
8 | import kotlinx.coroutines.flow.MutableStateFlow
9 | import kotlinx.coroutines.flow.asStateFlow
10 | import kotlinx.coroutines.flow.update
11 |
12 | class SetupDarkColorSchemesScreenVM(application: Application) : AndroidViewModel(application) {
13 | val context = application
14 |
15 | private val preferences = context.getSharedPreferences(context.packageName, Context.MODE_PRIVATE)
16 |
17 | private val _selectedTheme = MutableStateFlow(preferences.getString(Settings.DARK_COLOR_SCHEME, Settings.Values.ColorSchemes.BLUE)!!)
18 | val selectedTheme = _selectedTheme.asStateFlow()
19 |
20 | fun applyColorScheme(colorScheme: String, settingsVM: SettingsVM) {
21 |
22 | settingsVM.updateDarkColorSchemeSetting(colorScheme)
23 | _selectedTheme.update { colorScheme }
24 | }
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/setup/color_schemes/light/SetupLightColorSchemesScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.setup.color_schemes.light
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import androidx.lifecycle.AndroidViewModel
6 | import com.lighttigerxiv.simple.mp.compose.data.variables.Settings
7 | import com.lighttigerxiv.simple.mp.compose.settings.SettingsVM
8 | import kotlinx.coroutines.flow.MutableStateFlow
9 | import kotlinx.coroutines.flow.asStateFlow
10 | import kotlinx.coroutines.flow.update
11 |
12 | class SetupLightColorSchemesScreenVM(application: Application) : AndroidViewModel(application) {
13 |
14 | val context = application
15 |
16 | private val preferences = context.getSharedPreferences(context.packageName, Context.MODE_PRIVATE)
17 |
18 | private val _selectedTheme = MutableStateFlow(preferences.getString(Settings.LIGHT_COLOR_SCHEME, Settings.Values.ColorSchemes.BLUE)!!)
19 | val selectedTheme = _selectedTheme.asStateFlow()
20 |
21 | fun applyColorScheme(colorScheme: String, settingsVM: SettingsVM) {
22 |
23 | settingsVM.updateLightColorSchemeSetting(colorScheme)
24 | _selectedTheme.update { colorScheme }
25 | }
26 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/setup/permissions/PermissionsScreenVM.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.setup.permissions
2 |
3 | import android.app.Application
4 | import androidx.lifecycle.AndroidViewModel
5 | import com.lighttigerxiv.simple.mp.compose.functions.Permissions
6 | import kotlinx.coroutines.flow.MutableStateFlow
7 | import kotlinx.coroutines.flow.asStateFlow
8 | import kotlinx.coroutines.flow.update
9 |
10 | class PermissionsScreenVM(application: Application) : AndroidViewModel(application) {
11 |
12 |
13 | //************************************************
14 | // Variables
15 | //************************************************
16 |
17 |
18 | val context = application
19 |
20 | private val _screenLoaded = MutableStateFlow(false)
21 | val screenLoaded = _screenLoaded.asStateFlow()
22 |
23 | private val _storagePermissionGranted = MutableStateFlow(false)
24 | val storagePermissionGranted = _storagePermissionGranted.asStateFlow()
25 | fun updateStoragePermissionGranted(newValue: Boolean) {
26 | _storagePermissionGranted.update { newValue }
27 | }
28 |
29 | private val _notificationsPermissionGranted = MutableStateFlow(false)
30 | val notificationsPermissionGranted = _notificationsPermissionGranted.asStateFlow()
31 | fun updateNotificationsPermissionGranted(newValue: Boolean) {
32 | _notificationsPermissionGranted.update { newValue }
33 | }
34 |
35 |
36 | //************************************************
37 | // Functions
38 | //************************************************
39 |
40 |
41 | fun loadScreen() {
42 |
43 | _storagePermissionGranted.update { Permissions.hasStoragePermission(context) }
44 | _notificationsPermissionGranted.update { Permissions.hasNotificationsPermission(context) }
45 |
46 | _screenLoaded.update { true }
47 | }
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/screens/setup/welcome/WelcomeScreen.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.screens.setup.welcome
2 |
3 | import androidx.compose.foundation.background
4 | import com.lighttigerxiv.simple.mp.compose.R
5 | import androidx.compose.foundation.layout.*
6 | import androidx.compose.foundation.shape.RoundedCornerShape
7 | import androidx.compose.material.Icon
8 | import androidx.compose.material3.Button
9 | import androidx.compose.material.Text
10 | import androidx.compose.material3.ButtonDefaults
11 | import androidx.compose.material3.MaterialTheme
12 | import androidx.compose.runtime.Composable
13 | import androidx.compose.ui.Alignment
14 | import androidx.compose.ui.Modifier
15 | import androidx.compose.ui.draw.clip
16 | import androidx.compose.ui.res.painterResource
17 | import androidx.compose.ui.res.stringResource
18 | import androidx.compose.ui.unit.dp
19 | import androidx.navigation.NavHostController
20 | import com.lighttigerxiv.simple.mp.compose.data.variables.Routes
21 | import com.lighttigerxiv.simple.mp.compose.data.variables.SCREEN_PADDING
22 | import com.lighttigerxiv.simple.mp.compose.ui.composables.spacers.MediumVerticalSpacer
23 | import com.lighttigerxiv.simple.mp.compose.ui.composables.text.TitleMedium
24 |
25 | @Composable
26 | fun WelcomeScreen(
27 | navController: NavHostController
28 | ) {
29 |
30 | Column(
31 | modifier = Modifier
32 | .fillMaxSize()
33 | .padding(SCREEN_PADDING)
34 | ) {
35 |
36 | Column(
37 | modifier = Modifier
38 | .fillMaxWidth()
39 | .fillMaxHeight()
40 | .weight(fill = true, weight = 1f),
41 | verticalArrangement = Arrangement.Center,
42 | horizontalAlignment = Alignment.CenterHorizontally
43 | ) {
44 |
45 | Column(
46 | modifier = Modifier
47 | .height(80.dp)
48 | .width(80.dp)
49 | .clip(RoundedCornerShape(percent = 100))
50 | .background(MaterialTheme.colorScheme.primary),
51 | verticalArrangement = Arrangement.Center,
52 | horizontalAlignment = Alignment.CenterHorizontally
53 | ) {
54 | Icon(
55 | modifier = Modifier
56 | .height(60.dp)
57 | .width(60.dp),
58 | painter = painterResource(id = R.drawable.play_empty),
59 | contentDescription = "Logo Play Button",
60 | tint = MaterialTheme.colorScheme.onPrimary,
61 | )
62 | }
63 |
64 | MediumVerticalSpacer()
65 |
66 | TitleMedium(
67 | text = stringResource(id = R.string.WelcomeToSimpleMP),
68 | color = MaterialTheme.colorScheme.primary
69 | )
70 | }
71 |
72 | MediumVerticalSpacer()
73 |
74 | Row(
75 | modifier = Modifier
76 | .fillMaxWidth()
77 | .wrapContentHeight()
78 | ) {
79 |
80 | Spacer(
81 | modifier = Modifier
82 | .fillMaxWidth()
83 | .weight(weight = 1f, fill = true)
84 | )
85 |
86 | Button(
87 | onClick = {
88 | navController.navigate(Routes.Setup.PERMISSIONS)
89 | },
90 | colors = ButtonDefaults.buttonColors(
91 | containerColor = MaterialTheme.colorScheme.primary
92 | )
93 | ) {
94 |
95 | Text(
96 | text = stringResource(id = R.string.Next),
97 | color = MaterialTheme.colorScheme.onPrimary
98 | )
99 | }
100 | }
101 | }
102 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ActionsService.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.app.Service
4 | import android.content.ComponentName
5 | import android.content.Context
6 | import android.content.Intent
7 | import android.content.ServiceConnection
8 | import android.os.IBinder
9 |
10 | class ActionsService: Service() {
11 |
12 | var serviceBounded = false
13 | private lateinit var action: String
14 |
15 | private lateinit var smpService: SimpleMPService
16 |
17 | override fun onBind(intent: Intent?): IBinder? {
18 | return null
19 | }
20 |
21 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
22 |
23 | action = intent?.getStringExtra("action").toString()
24 |
25 | val serviceIntent = Intent( this, SimpleMPService::class.java )
26 | bindService( serviceIntent, connection, Context.BIND_AUTO_CREATE )
27 |
28 | return super.onStartCommand(intent, flags, startId)
29 | }
30 |
31 | private val connection = object : ServiceConnection {
32 |
33 | override fun onServiceConnected(name: ComponentName?, service: IBinder?) {
34 |
35 | val binder = service as SimpleMPService.LocalBinder
36 | smpService = binder.getService()
37 |
38 |
39 | when( action ){
40 |
41 | "stop"->smpService.stopMediaPlayer()
42 | "pause"->smpService.pauseMusic(applicationContext)
43 | "previous"->smpService.selectPreviousSong( applicationContext )
44 | "playPause"->smpService.pauseResumeMusic( applicationContext )
45 | "skip"->smpService.selectNextSong( applicationContext )
46 | }
47 |
48 |
49 | unbindService( this )
50 | }
51 |
52 | override fun onServiceDisconnected(name: ComponentName?) {
53 |
54 | serviceBounded = false
55 | }
56 | }
57 |
58 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ReceiverOpenApp.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.content.BroadcastReceiver
4 | import android.content.Context
5 | import android.content.Intent
6 | import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
7 | import com.lighttigerxiv.simple.mp.compose.activities.main.MainActivity
8 |
9 | class ReceiverOpenApp: BroadcastReceiver() {
10 | override fun onReceive(context: Context, intent: Intent?) {
11 |
12 | val newIntent = Intent( context, MainActivity::class.java ).addFlags( FLAG_ACTIVITY_NEW_TASK )
13 | newIntent.putExtra( "restore", true )
14 |
15 | context.startActivity( newIntent )
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ReceiverPlayPause.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.content.*
4 |
5 | class ReceiverPlayPause: BroadcastReceiver() {
6 |
7 |
8 | override fun onReceive(context: Context, intent: Intent?) {
9 |
10 | val actionsServiceIntent = Intent( context, ActionsService::class.java )
11 |
12 | actionsServiceIntent.putExtra( "action", "playPause" )
13 |
14 | context.startService( actionsServiceIntent )
15 | }
16 |
17 |
18 |
19 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ReceiverPreviousSong.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.content.*
4 |
5 | class ReceiverPreviousSong: BroadcastReceiver() {
6 |
7 |
8 | override fun onReceive(context: Context, intent: Intent?) {
9 |
10 |
11 | val actionsServiceIntent = Intent( context, ActionsService::class.java )
12 |
13 | actionsServiceIntent.putExtra( "action", "previous" )
14 |
15 | context.startService( actionsServiceIntent )
16 | }
17 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ReceiverSkipSong.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.content.*
4 |
5 | class ReceiverSkipSong: BroadcastReceiver() {
6 |
7 |
8 | override fun onReceive(context: Context, intent: Intent?) {
9 |
10 |
11 | val actionsServiceIntent = Intent( context, ActionsService::class.java )
12 |
13 | actionsServiceIntent.putExtra( "action", "skip" )
14 |
15 | context.startService( actionsServiceIntent )
16 | }
17 |
18 |
19 |
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/services/ReceiverStop.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.services
2 |
3 | import android.content.*
4 |
5 | class ReceiverStop: BroadcastReceiver() {
6 |
7 |
8 | override fun onReceive(context: Context, intent: Intent?) {
9 |
10 | val actionsServiceIntent = Intent( context, ActionsService::class.java )
11 |
12 | actionsServiceIntent.putExtra( "action", "stop" )
13 |
14 | context.startService( actionsServiceIntent )
15 | }
16 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/BottomSheetHandle.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.foundation.background
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.foundation.shape.RoundedCornerShape
6 | import androidx.compose.material3.MaterialTheme
7 | import androidx.compose.runtime.Composable
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.draw.clip
10 | import androidx.compose.ui.unit.Dp
11 | import androidx.compose.ui.unit.dp
12 |
13 | @Composable
14 | fun BottomSheetHandle(
15 | width: Dp = 40.dp
16 | ){
17 |
18 | Row(
19 | modifier = Modifier
20 | .fillMaxWidth()
21 | .wrapContentHeight(),
22 | horizontalArrangement = Arrangement.Center
23 | ) {
24 | Box(
25 | modifier = Modifier
26 | .width(width)
27 | .height(5.dp)
28 | .clip(RoundedCornerShape(percent = 100))
29 | .background(MaterialTheme.colorScheme.primary)
30 | )
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/Icons.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.clickable
5 | import androidx.compose.foundation.layout.height
6 | import androidx.compose.foundation.layout.width
7 | import androidx.compose.material3.Icon
8 | import androidx.compose.material3.MaterialTheme
9 | import androidx.compose.runtime.Composable
10 | import androidx.compose.ui.Modifier
11 | import androidx.compose.ui.graphics.Color
12 | import androidx.compose.ui.graphics.ColorFilter
13 | import androidx.compose.ui.layout.ContentScale
14 | import androidx.compose.ui.res.painterResource
15 | import androidx.compose.ui.unit.dp
16 |
17 | @Composable
18 | fun SmallIcon(
19 | id: Int,
20 | description: String? = null,
21 | color: Color = MaterialTheme.colorScheme.primary
22 | ) {
23 |
24 | Image(
25 | modifier = Modifier
26 | .height(20.dp)
27 | .width(20.dp),
28 | contentScale = ContentScale.Fit,
29 | painter = painterResource(id = id),
30 | contentDescription = description,
31 | colorFilter = ColorFilter.tint(color)
32 | )
33 | }
34 |
35 |
36 | @Composable
37 | fun MediumIcon(
38 | id: Int,
39 | description: String? = null,
40 | color: Color = MaterialTheme.colorScheme.primary
41 | ) {
42 |
43 | Image(
44 | modifier = Modifier
45 | .height(30.dp)
46 | .width(30.dp),
47 | contentScale = ContentScale.Fit,
48 | painter = painterResource(id = id),
49 | contentDescription = description,
50 | colorFilter = ColorFilter.tint(color)
51 | )
52 | }
53 |
54 | @Composable
55 | fun ClickableMediumIcon(
56 | id: Int,
57 | description: String? = null,
58 | color: Color = MaterialTheme.colorScheme.primary,
59 | onClick: () -> Unit
60 | ) {
61 |
62 | Icon(
63 | modifier = Modifier
64 | .height(35.dp)
65 | .width(35.dp)
66 | .clickable {
67 | onClick()
68 | },
69 | painter = painterResource(id = id),
70 | contentDescription = description,
71 | tint = color
72 | )
73 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/ImageCard.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import android.graphics.Bitmap
4 | import androidx.compose.foundation.Image
5 | import androidx.compose.foundation.background
6 | import androidx.compose.foundation.clickable
7 | import androidx.compose.foundation.layout.*
8 | import androidx.compose.foundation.shape.RoundedCornerShape
9 | import androidx.compose.material3.MaterialTheme
10 | import androidx.compose.material3.Text
11 | import androidx.compose.runtime.Composable
12 | import androidx.compose.ui.Alignment
13 | import androidx.compose.ui.Modifier
14 | import androidx.compose.ui.draw.clip
15 | import androidx.compose.ui.graphics.ColorFilter
16 | import androidx.compose.ui.graphics.asImageBitmap
17 | import androidx.compose.ui.layout.ContentScale
18 | import androidx.compose.ui.text.font.FontWeight
19 | import androidx.compose.ui.text.style.TextAlign
20 | import androidx.compose.ui.text.style.TextOverflow
21 | import androidx.compose.ui.unit.dp
22 | import androidx.compose.ui.unit.sp
23 |
24 | @Composable
25 | fun ImageCard(
26 | modifier: Modifier = Modifier,
27 | cardImage: Bitmap,
28 | imageTint: ColorFilter? = null,
29 | cardText: String,
30 | onCardClicked: () -> Unit,
31 | ){
32 |
33 | Box(
34 | modifier = modifier
35 | .fillMaxSize()
36 | .clip(RoundedCornerShape(14.dp))
37 | .background(MaterialTheme.colorScheme.surfaceVariant)
38 | .clickable { onCardClicked() }
39 |
40 | ) {
41 |
42 | Column(
43 | modifier = Modifier.fillMaxSize(),
44 | horizontalAlignment = Alignment.CenterHorizontally
45 | ){
46 | Image(
47 | bitmap = cardImage.asImageBitmap() ,
48 | contentDescription = "",
49 | colorFilter = imageTint,
50 | contentScale = ContentScale.Crop,
51 | modifier = Modifier
52 | .fillMaxWidth()
53 | .aspectRatio(1f)
54 | .padding(10.dp)
55 | .clip(RoundedCornerShape(14.dp))
56 | )
57 | Text(
58 | text = cardText,
59 | fontSize = 15.sp,
60 | textAlign = TextAlign.Center,
61 | maxLines = 1,
62 | overflow = TextOverflow.Ellipsis,
63 | color = MaterialTheme.colorScheme.onSurface,
64 | fontWeight = FontWeight.Medium,
65 | modifier = Modifier.padding(2.dp)
66 | )
67 | Spacer(modifier = Modifier.height(10.dp))
68 | }
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/PlayAndShuffleRow.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.foundation.background
4 | import androidx.compose.foundation.border
5 | import androidx.compose.foundation.clickable
6 | import androidx.compose.foundation.layout.*
7 | import androidx.compose.foundation.shape.RoundedCornerShape
8 | import androidx.compose.material3.Icon
9 | import androidx.compose.material3.MaterialTheme
10 | import androidx.compose.runtime.Composable
11 | import androidx.compose.runtime.remember
12 | import androidx.compose.ui.Alignment
13 | import androidx.compose.ui.Modifier
14 | import androidx.compose.ui.draw.clip
15 | import androidx.compose.ui.graphics.Color
16 | import androidx.compose.ui.platform.LocalContext
17 | import androidx.compose.ui.res.painterResource
18 | import androidx.compose.ui.unit.dp
19 | import com.lighttigerxiv.simple.mp.compose.R
20 | import com.lighttigerxiv.simple.mp.compose.functions.getAppString
21 |
22 | @Composable
23 | fun PlayAndShuffleRow(
24 | surfaceColor: Color,
25 | onPlayClick: () -> Unit,
26 | onSuffleClick: () -> Unit
27 | ){
28 |
29 | val context = LocalContext.current
30 |
31 | Row(
32 | modifier = Modifier
33 | .fillMaxWidth()
34 | ) {
35 |
36 | Row(
37 | modifier = Modifier
38 | .fillMaxWidth()
39 | .weight(1f, fill = true)
40 | .clip(RoundedCornerShape(100))
41 | .background(MaterialTheme.colorScheme.primary, shape = RoundedCornerShape(100))
42 | .clickable{
43 | onPlayClick()
44 | }
45 | .padding(10.dp),
46 | horizontalArrangement = Arrangement.Center,
47 | verticalAlignment = Alignment.CenterVertically
48 | ) {
49 |
50 | Icon(
51 | modifier = Modifier
52 | .height(15.dp)
53 | .width(15.dp),
54 | painter = painterResource(id = R.drawable.play),
55 | contentDescription = null,
56 | tint = MaterialTheme.colorScheme.onPrimary
57 | )
58 | Spacer(modifier = Modifier.width(10.dp))
59 | CustomText(
60 | text = remember { getAppString(context, R.string.Play) },
61 | color = MaterialTheme.colorScheme.onPrimary
62 | )
63 | }
64 |
65 | Spacer(modifier = Modifier.width(10.dp))
66 |
67 | Row(
68 | modifier = Modifier
69 | .fillMaxWidth()
70 | .weight(1f, fill = true)
71 | .border(1.dp, MaterialTheme.colorScheme.primary, shape = RoundedCornerShape(100))
72 | .clip(RoundedCornerShape(100))
73 | .background(surfaceColor, shape = RoundedCornerShape(100))
74 | .clickable{
75 | onSuffleClick()
76 | }
77 | .padding(10.dp),
78 | horizontalArrangement = Arrangement.Center,
79 | verticalAlignment = Alignment.CenterVertically
80 | ) {
81 |
82 | Icon(
83 | modifier = Modifier
84 | .height(15.dp)
85 | .width(15.dp),
86 | painter = painterResource(id = R.drawable.shuffle),
87 | contentDescription = null,
88 | tint = MaterialTheme.colorScheme.primary
89 | )
90 | Spacer(modifier = Modifier.width(10.dp))
91 | CustomText(
92 | text = remember { getAppString(context, R.string.Shuffle) },
93 | color = MaterialTheme.colorScheme.primary
94 | )
95 | }
96 | }
97 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/SheetDraggingBar.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.foundation.background
4 | import androidx.compose.foundation.layout.*
5 | import androidx.compose.foundation.shape.RoundedCornerShape
6 | import androidx.compose.material3.MaterialTheme
7 | import androidx.compose.runtime.Composable
8 | import androidx.compose.ui.Modifier
9 | import androidx.compose.ui.draw.clip
10 | import androidx.compose.ui.unit.dp
11 |
12 | @Composable
13 | fun SheetDraggingBar(){
14 | Row(
15 | modifier = Modifier
16 | .fillMaxWidth()
17 | .wrapContentHeight(),
18 | horizontalArrangement = Arrangement.Center
19 | ) {
20 | Row(
21 | modifier = Modifier
22 | .width(50.dp)
23 | .height(5.dp)
24 | .clip(RoundedCornerShape(percent = 100))
25 | .background(MaterialTheme.colorScheme.primary)
26 | ) {}
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/Text.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.material3.MaterialTheme
4 | import androidx.compose.runtime.Composable
5 | import androidx.compose.ui.Modifier
6 | import androidx.compose.ui.graphics.Color
7 | import androidx.compose.ui.text.font.FontWeight
8 | import androidx.compose.ui.text.style.TextAlign
9 | import androidx.compose.ui.text.style.TextOverflow
10 | import androidx.compose.ui.unit.TextUnit
11 | import androidx.compose.ui.unit.sp
12 |
13 | @Composable
14 | fun CustomText(
15 | modifier: Modifier = Modifier,
16 | text: String,
17 | color: Color = MaterialTheme.colorScheme.onSurface,
18 | size: TextUnit = 16.sp,
19 | weight: FontWeight = FontWeight.Normal,
20 | textAlign: TextAlign = TextAlign.Start,
21 | maxLines: Int = 1
22 | ){
23 |
24 | androidx.compose.material3.Text(
25 | modifier = modifier,
26 | text = text,
27 | color = color,
28 | fontSize = size,
29 | fontWeight = weight,
30 | textAlign = textAlign,
31 | maxLines = maxLines,
32 | overflow = TextOverflow.Ellipsis
33 | )
34 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/Toolbars.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables
2 |
3 | import androidx.compose.foundation.Image
4 | import androidx.compose.foundation.background
5 | import androidx.compose.foundation.clickable
6 | import androidx.compose.foundation.layout.*
7 | import androidx.compose.foundation.shape.RoundedCornerShape
8 | import androidx.compose.material3.*
9 | import androidx.compose.runtime.Composable
10 | import androidx.compose.runtime.remember
11 | import androidx.compose.ui.Alignment
12 | import androidx.compose.ui.Modifier
13 | import androidx.compose.ui.draw.clip
14 | import androidx.compose.ui.graphics.ColorFilter
15 | import androidx.compose.ui.graphics.asImageBitmap
16 | import androidx.compose.ui.layout.ContentScale
17 | import androidx.compose.ui.platform.LocalContext
18 | import androidx.compose.ui.text.font.FontWeight
19 | import androidx.compose.ui.unit.dp
20 | import androidx.compose.ui.unit.sp
21 | import com.lighttigerxiv.simple.mp.compose.R
22 | import com.lighttigerxiv.simple.mp.compose.data.variables.ImageSizes
23 | import com.lighttigerxiv.simple.mp.compose.functions.getImage
24 |
25 | @Composable
26 | fun CustomToolbar(
27 | backText: String,
28 | onBackClick: ()-> Unit,
29 | secondaryContent: @Composable (RowScope.() -> Unit)? = null
30 | ) {
31 |
32 | val context = LocalContext.current
33 |
34 | Row(modifier = Modifier
35 | .fillMaxWidth()
36 | .height(40.dp)) {
37 |
38 | Row(
39 | modifier = Modifier
40 | .wrapContentWidth()
41 | .clip(RoundedCornerShape(percent = 30))
42 | .background(MaterialTheme.colorScheme.surfaceVariant)
43 | .clickable { onBackClick() }
44 | .padding(10.dp),
45 | verticalAlignment = Alignment.CenterVertically
46 | ) {
47 |
48 | Image(
49 | bitmap = remember { getImage(context, R.drawable.back, ImageSizes.SMALL).asImageBitmap() },
50 | contentDescription = "",
51 | contentScale = ContentScale.Crop,
52 | colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.primary),
53 | modifier = Modifier
54 | .height(14.dp)
55 | .width(14.dp)
56 | )
57 |
58 | Text(
59 | text = backText,
60 | fontSize = 14.sp,
61 | fontWeight = FontWeight.Medium,
62 | color = MaterialTheme.colorScheme.primary,
63 | )
64 | }
65 | if(secondaryContent != null) secondaryContent()
66 | }
67 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/MediumHorizontalSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.width
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.MEDIUM_SPACING
8 |
9 | @Composable
10 | fun MediumHorizontalSpacer(){
11 | Spacer(modifier = Modifier.width(MEDIUM_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/MediumVerticalSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.height
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.MEDIUM_SPACING
8 |
9 | @Composable
10 | fun MediumVerticalSpacer(){
11 | Spacer(modifier = Modifier.height(MEDIUM_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/SmallHorizontalSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.width
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.SMALL_SPACING
8 |
9 | @Composable
10 | fun SmallHorizontalSpacer(){
11 | Spacer(modifier = Modifier.width(SMALL_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/SmallVerticalSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.height
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.SMALL_SPACING
8 |
9 | @Composable
10 | fun SmallVerticalSpacer(){
11 | Spacer(modifier = Modifier.height(SMALL_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/XSmallHeightSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.height
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.XSMALL_SPACING
8 |
9 | @Composable
10 | fun XSmallHeightSpacer(){
11 | Spacer(modifier = Modifier.height(XSMALL_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/spacers/XSmallWidthSpacer.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.spacers
2 |
3 | import androidx.compose.foundation.layout.Spacer
4 | import androidx.compose.foundation.layout.width
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.Modifier
7 | import com.lighttigerxiv.simple.mp.compose.data.variables.XSMALL_SPACING
8 |
9 | @Composable
10 | fun XSmallWidthSpacer(){
11 | Spacer(modifier = Modifier.width(XSMALL_SPACING))
12 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/composables/text/TitleMedium.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.composables.text
2 |
3 | import androidx.compose.material3.MaterialTheme
4 | import androidx.compose.material3.Text
5 | import androidx.compose.runtime.Composable
6 | import androidx.compose.ui.graphics.Color
7 | import androidx.compose.ui.text.font.FontWeight
8 | import com.lighttigerxiv.simple.mp.compose.data.variables.MEDIUM_TITLE_SIZE
9 |
10 | @Composable
11 | fun TitleMedium(
12 | text: String,
13 | color: Color = MaterialTheme.colorScheme.onSurface
14 | ){
15 |
16 | Text(
17 | text = text,
18 | fontSize = MEDIUM_TITLE_SIZE,
19 | color = color,
20 | fontWeight = FontWeight(500)
21 | )
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.theme
2 |
3 | import androidx.compose.foundation.shape.RoundedCornerShape
4 | import androidx.compose.material.Shapes
5 | import androidx.compose.ui.unit.dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lighttigerxiv/simple/mp/compose/ui/theme/Type.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose.ui.theme
2 |
3 | import androidx.compose.material.Typography
4 | import androidx.compose.ui.text.TextStyle
5 | import androidx.compose.ui.text.font.FontFamily
6 | import androidx.compose.ui.text.font.FontWeight
7 | import androidx.compose.ui.unit.sp
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-nodpi/example_appwidget_preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/drawable-nodpi/example_appwidget_preview.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v21/app_widget_inner_view_background.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v31/app_widget_background.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/alphabetic_sort.xml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/app_widget_background.xml:
--------------------------------------------------------------------------------
1 |
5 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/back.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/brush.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/brush_filled.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/car.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cd.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/cd_filled.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/check.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/close.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/close_notification.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/colorscheme.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/date_sort.xml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
7 |
9 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/demons.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/drawable/demons.jpg
--------------------------------------------------------------------------------
/app/src/main/res/drawable/drag.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/filter.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/folder.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/github.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/home_filled.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_about_regular.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_arrow_down_solid.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_arrow_up_solid.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_database.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_fdroid.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
10 |
13 |
16 |
17 |
20 |
23 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_pause_round_solid.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_play_round_solid.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_play_store.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/icon_plus_solid.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/info.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/list.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/list_filled.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/loading.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/menu.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/moon.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/mtrl_popupmenu_background_overlay.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/music_note.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/next.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/next_notification.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/other_filled.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pause.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/pause_notification.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/person_filled.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/play.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/play_empty.xml:
--------------------------------------------------------------------------------
1 |
6 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/play_notification.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/playlist.xml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/playlist_filled.xml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/plus.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/previous.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/previous_notification.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/queue_list.xml:
--------------------------------------------------------------------------------
1 |
3 |
5 |
7 |
9 |
11 |
14 |
17 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/reload.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/remove.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/repeat.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/round_widget_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/save.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/select.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/shuffle.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/smartphone.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/sort.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
12 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/trash.xml:
--------------------------------------------------------------------------------
1 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/vertical_three_dots.xml:
--------------------------------------------------------------------------------
1 |
6 |
11 |
16 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/widget_preview_below_12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/drawable/widget_preview_below_12.png
--------------------------------------------------------------------------------
/app/src/main/res/layout-v31/simple_m_p_disabled_widget.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout-v31/simple_m_p_widget.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
18 |
19 |
20 |
39 |
40 |
49 |
50 |
64 |
65 |
66 |
79 |
80 |
93 |
94 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/simple_m_p_disabled_widget.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/simple_m_p_widget.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
15 |
16 |
17 |
36 |
37 |
45 |
46 |
60 |
61 |
62 |
75 |
76 |
89 |
90 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-hdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-mdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/raw/hide_navbar_motion.json5:
--------------------------------------------------------------------------------
1 | {
2 | ConstraintSets: {
3 | start: {
4 | navbar: {
5 | height: 55,
6 | bottom: ['parent', 'bottom', 0]
7 | },
8 | player: {
9 | height: "spread",
10 | bottom: ['parent', 'bottom', 0],
11 | },
12 | playerScreen: {
13 | visibility: 'gone',
14 | }
15 | },
16 | end: {
17 | navbar: {
18 | height: 55,
19 | bottom: ['parent', 'bottom', -55]
20 | },
21 | player: {
22 | height: "spread",
23 | bottom: ['parent', 'bottom', 0],
24 | },
25 | playerScreen: {
26 | visibility: 'gone',
27 | }
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/res/raw/player_visibility.json5:
--------------------------------------------------------------------------------
1 | {
2 | ConstraintSets: {
3 | start: {
4 | player: {
5 | visibility: 'invisible',
6 | }
7 | },
8 | end: {
9 | player: {
10 | visibility: 'visible',
11 | }
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/app/src/main/res/values-night/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FF6200EE
4 | #FF3700B3
5 | #FF03DAC5
6 | #FF018786
7 | #FF000000
8 | #FFFFFFFF
9 | #FFE1F5FE
10 | #FF81D4FA
11 | #FF039BE5
12 | #FF01579B
13 |
14 | #ffffffff
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #00000000
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 | #FFE1F5FE
11 | #FF81D4FA
12 | #FF039BE5
13 | #FF01579B
14 |
15 | #ff000000
16 | #FFFFFF
17 | #232323
18 | #121212
19 | #ffffff
20 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
8 | 0dp
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #1E1E2E
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
15 |
16 |
20 |
--------------------------------------------------------------------------------
/app/src/main/res/xml-v31/simple_m_p_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/backup_rules.xml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/data_extraction_rules.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/simple_m_p_widget_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/release/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/release/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/app/src/release/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/release/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #1E1E2E
4 |
--------------------------------------------------------------------------------
/app/src/test/java/com/lighttigerxiv/simple/mp/compose/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.lighttigerxiv.simple.mp.compose
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext {
3 | compose_version = '1.4.3'
4 | }
5 | repositories {
6 | mavenCentral()
7 | google()
8 | }
9 | }
10 | plugins {
11 | id 'com.android.application' version '7.4.2' apply false
12 | id 'com.android.library' version '7.4.2' apply false
13 | id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
14 | id 'io.realm.kotlin' version '1.6.0' apply false
15 | }
16 |
17 | task clean(type: Delete) {
18 | delete rootProject.buildDir
19 | }
20 |
--------------------------------------------------------------------------------
/fastlane/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/.gitkeep
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/.gitkeep
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/changelogs/3.txt:
--------------------------------------------------------------------------------
1 | Fixed some bugs regarding playlists
2 | UI improvements
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/full_description.txt:
--------------------------------------------------------------------------------
1 | Simple MP (Simple Music Player) is music player based on material you design. This app is for those who like a minimalist look too their apps. You can change it's theme either by having it pick the colors by your device or by selecting one of the pre done themes. The app is open sorce so you can always go to the about page and open an issue regarding a bug or a feature that really should be added.
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/featureGraphic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/featureGraphic.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/icon.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/6.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/7.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/images/phoneScreenshots/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/fastlane/metadata/android/en-US/images/phoneScreenshots/8.png
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/short_description.txt:
--------------------------------------------------------------------------------
1 | A simple music player based on material you design.
--------------------------------------------------------------------------------
/fastlane/metadata/android/en-US/title.txt:
--------------------------------------------------------------------------------
1 | Simple MP (Simple Music Player)
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Kotlin code style for this project: "official" or "obsolete":
19 | kotlin.code.style=official
20 | # Enables namespacing of each library's R class so that its R class includes only the
21 | # resources declared in the library itself and none from the library's dependencies,
22 | # thereby reducing the size of the R class for that library
23 | android.nonTransitiveRClass=true
24 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lighttigerXIV/SimpleMP-Compose/004bca1b3456e1f4c8c2ffd08cbf3a083f96d6d0/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jan 27 22:39:27 WET 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto execute
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto execute
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :execute
68 | @rem Setup the command line
69 |
70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71 |
72 |
73 | @rem Execute Gradle
74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75 |
76 | :end
77 | @rem End local scope for the variables with windows NT shell
78 | if "%ERRORLEVEL%"=="0" goto mainEnd
79 |
80 | :fail
81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82 | rem the _cmd.exe /c_ return code!
83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84 | exit /b 1
85 |
86 | :mainEnd
87 | if "%OS%"=="Windows_NT" endlocal
88 |
89 | :omega
90 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 |
7 | }
8 | }
9 | dependencyResolutionManagement {
10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11 | repositories {
12 | google()
13 | mavenCentral()
14 | maven { url 'https://jitpack.io' }
15 | }
16 | }
17 | rootProject.name = "Compose - SimpleMP"
18 | include ':app'
19 |
--------------------------------------------------------------------------------