├── .gitignore ├── HISTORY ├── LICENSE ├── MODULE_LICENSE_APACHE2 ├── NOTICE ├── README ├── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── graphics └── icon.xcf ├── lint.xml ├── proguard.pro └── src ├── main ├── AndroidManifest.xml ├── java │ └── nu │ │ └── staldal │ │ ├── djdplayer │ │ ├── AboutActivity.java │ │ ├── ExportPlaylistTask.java │ │ ├── FragmentServiceConnection.java │ │ ├── IdAndName.java │ │ ├── ImportPlaylistTask.java │ │ ├── MediaPlayback.java │ │ ├── MediaPlaybackService.java │ │ ├── MusicAlphabetIndexer.java │ │ ├── MusicUtils.java │ │ ├── MyMediaPlayer.java │ │ ├── PickMusicFolderActivity.java │ │ ├── PlayQueueCursor.java │ │ ├── SettingsActivity.java │ │ ├── SettingsFragment.java │ │ ├── ShufflePlaylistTask.java │ │ └── provider │ │ │ ├── CursorWithCountColumn.java │ │ │ ├── ID3Utils.java │ │ │ ├── MusicContract.java │ │ │ └── MusicProvider.java │ │ └── ui │ │ ├── RepeatingImageButton.java │ │ ├── TouchInterceptor.java │ │ └── WithSectionMenu.java └── res │ ├── drawable-hdpi │ ├── albumart_mp_unknown_list.png │ ├── app_icon.png │ ├── ic_context_menu.png │ ├── ic_launcher_shortcut_music_playlist.png │ ├── ic_menu_add.png │ ├── ic_menu_clear_playlist.png │ ├── ic_menu_delete.png │ ├── ic_menu_eq.png │ ├── ic_menu_info_details.png │ ├── ic_menu_interleave.png │ ├── ic_menu_play_clip.png │ ├── ic_menu_preferences.png │ ├── ic_menu_search.png │ ├── ic_menu_share.png │ ├── ic_menu_shuffle.png │ ├── ic_menu_uniqueify.png │ ├── ic_menu_unzoom.png │ ├── ic_menu_zoom.png │ ├── ic_mp_artist_list.png │ ├── ic_mp_artist_playback.png │ ├── ic_mp_genre_playback.png │ ├── ic_mp_repeat_all_btn.png │ ├── ic_mp_repeat_off_btn.png │ ├── ic_mp_repeat_once_btn.png │ ├── ic_mp_repeat_stopafter_btn.png │ ├── ic_mp_song_list.png │ ├── ic_mp_song_playback.png │ ├── ic_section_menu.png │ ├── indicator_ic_mp_crossfading_list.png │ ├── indicator_ic_mp_playing_list.png │ ├── playlist_tile_drag.9.png │ ├── playlist_tile_longpress.9.png │ ├── playlist_tile_normal.9.png │ ├── playlist_tile_pressed.9.png │ ├── playlist_tile_selected.9.png │ └── stat_notify_musicplayer.png │ ├── drawable-mdpi │ ├── albumart_mp_unknown_list.png │ ├── app_icon.png │ ├── ic_context_menu.png │ ├── ic_launcher_shortcut_music_playlist.png │ ├── ic_menu_add.png │ ├── ic_menu_clear_playlist.png │ ├── ic_menu_delete.png │ ├── ic_menu_eq.png │ ├── ic_menu_info_details.png │ ├── ic_menu_interleave.png │ ├── ic_menu_play_clip.png │ ├── ic_menu_preferences.png │ ├── ic_menu_search.png │ ├── ic_menu_share.png │ ├── ic_menu_shuffle.png │ ├── ic_menu_uniqueify.png │ ├── ic_menu_unzoom.png │ ├── ic_menu_zoom.png │ ├── ic_mp_artist_list.png │ ├── ic_mp_artist_playback.png │ ├── ic_mp_genre_playback.png │ ├── ic_mp_repeat_all_btn.png │ ├── ic_mp_repeat_off_btn.png │ ├── ic_mp_repeat_once_btn.png │ ├── ic_mp_repeat_stopafter_btn.png │ ├── ic_mp_song_list.png │ ├── ic_mp_song_playback.png │ ├── ic_section_menu.png │ ├── indicator_ic_mp_crossfading_list.png │ ├── indicator_ic_mp_playing_list.png │ ├── playlist_tile_drag.9.png │ ├── playlist_tile_longpress.9.png │ ├── playlist_tile_normal.9.png │ ├── playlist_tile_pressed.9.png │ ├── playlist_tile_selected.9.png │ └── stat_notify_musicplayer.png │ ├── drawable-xhdpi │ ├── app_icon.png │ ├── ic_context_menu.png │ ├── ic_menu_add.png │ ├── ic_menu_delete.png │ ├── ic_menu_eq.png │ ├── ic_menu_info_details.png │ ├── ic_menu_preferences.png │ ├── ic_menu_search.png │ ├── ic_menu_share.png │ ├── ic_menu_shuffle.png │ ├── ic_menu_unzoom.png │ ├── ic_menu_zoom.png │ ├── ic_mp_repeat_all_btn.png │ ├── ic_mp_repeat_off_btn.png │ ├── ic_mp_repeat_once_btn.png │ ├── ic_mp_repeat_stopafter_btn.png │ └── ic_section_menu.png │ ├── drawable-xxhdpi │ └── app_icon.png │ ├── layout │ └── select_music_folder.xml │ └── values │ ├── arrays.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── strings2.xml ├── mobile ├── AndroidManifest.xml ├── java │ └── nu │ │ └── staldal │ │ └── djdplayer │ │ └── mobile │ │ ├── AlbumFragment.java │ │ ├── ArtistFragment.java │ │ ├── BrowserFragment.java │ │ ├── CategoryFragment.java │ │ ├── CreatePlaylist.java │ │ ├── FolderFragment.java │ │ ├── GenreFragment.java │ │ ├── MediaAppWidgetProvider.java │ │ ├── MediaButtonIntentReceiver.java │ │ ├── MediaPlaybackActivity.java │ │ ├── MetadataCategoryFragment.java │ │ ├── MetadataCategoryListAdapter.java │ │ ├── MobileMediaPlaybackService.java │ │ ├── MusicBrowserActivity.java │ │ ├── NarrowPlayerFooterFragment.java │ │ ├── NowPlayingFragment.java │ │ ├── PlayQueueFragment.java │ │ ├── PlayerFooterFragment.java │ │ ├── PlayerHeaderFragment.java │ │ ├── PlaylistFragment.java │ │ ├── PlaylistShortcutActivity.java │ │ ├── QueryFragment.java │ │ ├── RescanActivity.java │ │ ├── SimpleCursorAdapterWithContextMenu.java │ │ ├── TrackFragment.java │ │ └── TrackInfoFragment.java └── res │ ├── drawable │ ├── actionbar_background.xml │ ├── appwidget_background.xml │ ├── appwidget_preview.png │ ├── appwidget_preview_w600dp.png │ ├── button_background.xml │ ├── list_selector_background.xml │ ├── list_selector_background_transition.xml │ ├── nowplaying_background.xml │ └── playlist_tile.xml │ ├── layout-h400dp │ └── audio_player.xml │ ├── layout-w500dp │ ├── music_browser_activity.xml │ └── player_footer.xml │ ├── layout-w600dp-h400dp │ ├── appwidget.xml │ ├── music_browser_activity.xml │ └── narrow_player_footer.xml │ ├── layout-w600dp │ └── player_footer.xml │ ├── layout-w800dp │ ├── audio_player.xml │ ├── narrow_player_footer.xml │ └── track_list_item_common.xml │ ├── layout │ ├── about.xml │ ├── appwidget.xml │ ├── audio_player.xml │ ├── audio_player_land.xml │ ├── audio_player_port.xml │ ├── create_playlist.xml │ ├── edit_track_list_item.xml │ ├── music_browser_activity.xml │ ├── narrow_player_footer.xml │ ├── nowplaying.xml │ ├── player_footer.xml │ ├── player_header.xml │ ├── playlist_shortcut.xml │ ├── rename_playlist.xml │ ├── track_info.xml │ ├── track_list_item.xml │ └── track_list_item_common.xml │ ├── menu-h400dp │ └── player_menu.xml │ ├── menu-w600dp-h400dp │ └── browser_menu.xml │ ├── menu-w800dp │ └── player_menu.xml │ ├── menu │ ├── browser_menu.xml │ └── player_menu.xml │ ├── values-w600dp-h400dp │ ├── styles.xml │ └── values.xml │ ├── values │ ├── ids.xml │ ├── styles.xml │ ├── themes.xml │ └── values.xml │ ├── xml-v19 │ └── preferences.xml │ ├── xml-w600dp-h400dp │ └── appwidget_info.xml │ └── xml │ ├── appwidget_info.xml │ ├── preferences.xml │ └── searchable.xml ├── test └── java │ └── nu │ └── staldal │ └── djdplayer │ └── tests │ └── ID3UtilsTest.java └── tv ├── AndroidManifest.xml ├── java └── nu │ └── staldal │ ├── djdplayer │ └── tv │ │ ├── ActionCardPresenter.java │ │ ├── BrowserActivity.java │ │ ├── BrowserFragment.java │ │ ├── CategoryCardPresenter.java │ │ ├── CategoryDetailsActivity.java │ │ ├── CategoryItem.java │ │ ├── CategoryLoader.java │ │ ├── FolderItem.java │ │ ├── NowPlayingFragment.java │ │ ├── PlayQueueFragment.java │ │ ├── PlaybackActivity.java │ │ ├── SettingsItem.java │ │ ├── SongItem.java │ │ ├── SongRowPresenter.java │ │ └── TvMediaPlaybackService.java │ └── leanback │ ├── ActionCardView.java │ ├── ClickableItemBridgeAdapter.java │ └── TextCardView.java └── res ├── drawable-xhdpi └── app_banner.png ├── drawable └── song_list_row_background.xml ├── layout ├── about.xml ├── action_card_view.xml ├── nowplaying.xml ├── song_list_row.xml ├── text_card_view.xml ├── tv_browser_activity.xml ├── tv_category_details_activity.xml ├── tv_play_queue_fragment.xml └── tv_playback_activity.xml ├── values ├── colors.xml ├── dimens.xml ├── strings2.xml ├── styles.xml └── values.xml └── xml └── preferences.xml /.gitignore: -------------------------------------------------------------------------------- 1 | gen/* 2 | out/* 3 | bin/* 4 | build/* 5 | local.properties 6 | gradle.properties 7 | tests/gen/* 8 | .idea 9 | *.iml 10 | .gradle 11 | -------------------------------------------------------------------------------- /HISTORY: -------------------------------------------------------------------------------- 1 | 1.1 2 | --- 3 | * Shuffle stored playlist 4 | * Interleave category/folder/playlist with play queue 5 | * Fix occasional crash 6 | 7 | 1.1.1 8 | ----- 9 | * Fix handling of special characters in folder names 10 | 11 | 1.2 12 | --- 13 | * Show current music folder when selecting a new 14 | * Automatically refresh folder view when changing music folder 15 | * New folder tab icon 16 | 17 | 1.3 18 | --- 19 | * Shuffle before play/queue/interleave/add to play list from category 20 | * Possible to interleave from options menu 21 | * Improve layout of playback view 22 | 23 | 1.4 24 | --- 25 | * Preference to change click on song behaviour 26 | * Export playlist to M3U file in Music folder 27 | * Command to clear duplicates from play queue and playlist 28 | * Enable Android 4.0 (Ice Cream Sandwich) UI enhancements 29 | 30 | 1.5 31 | --- 32 | * Improve system notification layout on Android 2.x 33 | * Enable more Android 4 UI enhancements, by using Holo theme 34 | * Possibility to stop after current song 35 | 36 | 1.6 37 | --- 38 | * Use Holo theme consistently on Android 4 39 | 40 | 1.7 41 | --- 42 | * Some changes to cater for tablets in landscape mode 43 | * Make it possible to run in AndroVM 44 | 45 | 1.8 46 | --- 47 | * Basic tablet support 48 | * Properly styled icon for playlist shortcuts 49 | * Avoid interference with other music players when switching tabs 50 | 51 | 1.9 52 | --- 53 | * Bug fixes 54 | * Layout improvements 55 | * Performance improvements 56 | 57 | 2.0 58 | --- 59 | * Integrate current playing song and play queue view 60 | * Use Action Bar and other Android 4 UI enhancements 61 | * Improved tablet support 62 | 63 | 2.1 64 | --- 65 | * Improve interleave menu 66 | * Don't zoom play queue in landscape mode 67 | * Improved app widget 68 | * Remote control in lock screen 69 | 70 | 2.2 71 | --- 72 | * Improved app widget 73 | * Pause button in system notification 74 | 75 | 2.3 76 | --- 77 | * Bug fixes 78 | * Play all next for categories 79 | * Improved music picking 80 | 81 | 2.4 82 | --- 83 | * Hide rescan music on Android 4.4, since it does not work there 84 | * Two column layout for tablets 85 | * Context menu button in lists 86 | 87 | 2.5 88 | --- 89 | * Improved tablet layout 90 | * Bug fixes 91 | 92 | 2.6 93 | --- 94 | * Improved layout 95 | * About 96 | * Bug fixes 97 | 98 | 2.6.1 99 | ----- 100 | * Bug fixes 101 | 102 | 2.6.2 103 | ----- 104 | * Bug fix 105 | 106 | 2.6.3 107 | ----- 108 | * Improved layout on phones without menu button, or with Android 4.4+ 109 | 110 | 2.7 111 | --- 112 | * Share playlist 113 | * Transfer playlist between two devices via Bluetooth or WiFi Direct 114 | 115 | 2.8 116 | --- 117 | * Cross-fade between songs 118 | 119 | 2.9 120 | --- 121 | * Bug fix in removing dups from playlist 122 | * Show filename of exported playlist 123 | * Add all songs in one playlist to another playlist 124 | * Add all songs in queue to a playlist 125 | 126 | 2.10 127 | ---- 128 | * Playback buttons in notification 129 | * Remote control in lock screen now works in Android 5 130 | 131 | 2.11 132 | ---- 133 | * ViewPager to swipe horizontally between tabs 134 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005-2008, The Android Open Source Project 2 | Copyright (c) 2012-2016, Mikael Ståldal 3 | 4 | Licensed under the Apache License, Version 2.0, see the NOTICE file; 5 | you may not use this project except in compliance with the License. 6 | -------------------------------------------------------------------------------- /MODULE_LICENSE_APACHE2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/MODULE_LICENSE_APACHE2 -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | DJD Player is a music player and organizer app for Android, adapted for the needs of DJs playing music at parties and dancing events. 2 | 3 | It is based on the standard Music Player from The Android Open Source Project (which comes pre-installed on many Android phones). 4 | 5 | Enhancements over the standard Music Player: 6 | 7 | * Genre support: 8 | - genre browsing tab 9 | - show genre of currently playing song 10 | 11 | * Do not pretend that album is a proper subcategory of artist (one album can contain songs from different artists) 12 | 13 | * Show number of songs for all categories (artist, album, genre), folders and playlists 14 | 15 | * Jump directly to list of songs for artist/genre from currently playing song view 16 | 17 | * Integrate current playing song and play queue view 18 | 19 | * Always show currently playing song footer in lists, with play/pause and next button 20 | 21 | * Improved play queue 22 | 23 | * Improved shuffling 24 | 25 | * Possible to force rescan of music library 26 | 27 | * Application settings 28 | 29 | * Delete from playlist by slide 30 | 31 | * Track info screen 32 | 33 | * Browse by folder 34 | 35 | * Search for song, artist and album 36 | 37 | * Shuffle stored playlist 38 | 39 | * Interleave category/folder/playlist with play queue 40 | 41 | * Export playlist to M3U file in Music folder 42 | 43 | * Possibility to stop after current song 44 | 45 | * Remote control in lock screen 46 | 47 | * Pause button in system notification 48 | 49 | * Two column layout for tablets 50 | 51 | * Context menu button in list items 52 | 53 | * Share songs and playlists 54 | 55 | * Transfer playlist between two devices via Bluetooth or WiFi Direct 56 | 57 | * Cross-fade between songs 58 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | mavenCentral() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:2.3.3' 8 | classpath 'me.tatarka:gradle-retrolambda:3.2.5' 9 | classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2' 10 | } 11 | 12 | // Exclude the version that the android plugin depends on. 13 | configurations.classpath.exclude group: 'com.android.tools.external.lombok' 14 | } 15 | 16 | allprojects { 17 | repositories { 18 | jcenter() 19 | mavenCentral() 20 | } 21 | } 22 | 23 | apply plugin: 'com.android.application' 24 | apply plugin: 'me.tatarka.retrolambda' 25 | 26 | ext { 27 | supportLibVersion = "25.3.1" 28 | } 29 | 30 | android { 31 | compileSdkVersion 25 32 | buildToolsVersion "25.0.3" 33 | 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_8 36 | targetCompatibility JavaVersion.VERSION_1_8 37 | } 38 | 39 | defaultConfig { 40 | applicationId "nu.staldal.djdplayer" 41 | targetSdkVersion 22 42 | 43 | dependencies { 44 | compile "com.android.support:appcompat-v7:${supportLibVersion}" 45 | testCompile 'junit:junit:4.12' 46 | } 47 | } 48 | 49 | if (project.hasProperty("KEY_STORE")) { 50 | signingConfigs { 51 | release { 52 | storeFile file(KEY_STORE) 53 | storePassword KEY_STORE_PASSWORD 54 | keyAlias KEY_ALIAS 55 | keyPassword KEY_PASSWORD 56 | } 57 | } 58 | } else { 59 | signingConfigs { 60 | release { 61 | } 62 | } 63 | } 64 | 65 | buildTypes { 66 | release { 67 | minifyEnabled true 68 | shrinkResources true 69 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro' 70 | debuggable false 71 | signingConfig signingConfigs.release 72 | } 73 | preview { 74 | minifyEnabled true 75 | shrinkResources true 76 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro' 77 | debuggable true 78 | signingConfig signingConfigs.release 79 | } 80 | debug { 81 | minifyEnabled false 82 | shrinkResources false 83 | // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.pro' 84 | debuggable true 85 | // signing debug 86 | } 87 | } 88 | 89 | productFlavors { 90 | mobile { 91 | minSdkVersion 16 92 | } 93 | tv { 94 | minSdkVersion 21 95 | 96 | dependencies { 97 | tvCompile "com.android.support:leanback-v17:${supportLibVersion}" 98 | } 99 | } 100 | } 101 | 102 | } 103 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Aug 01 10:55:02 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /graphics/icon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/graphics/icon.xcf -------------------------------------------------------------------------------- /lint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /proguard.pro: -------------------------------------------------------------------------------- 1 | # For RetroLambda 2 | -dontwarn java.lang.invoke.* -------------------------------------------------------------------------------- /src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/AboutActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | import android.app.Activity; 19 | import android.os.Bundle; 20 | 21 | public class AboutActivity extends Activity { 22 | @Override 23 | public void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | setContentView(R.layout.about); 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/FragmentServiceConnection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | public interface FragmentServiceConnection { 19 | void onServiceConnected(MediaPlayback service); 20 | 21 | void onServiceDisconnected(); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/IdAndName.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | public class IdAndName { 19 | public final long id; 20 | public final String name; 21 | 22 | public IdAndName(long id, String name) { 23 | this.id = id; 24 | this.name = name; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/MusicAlphabetIndexer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2008 The Android Open Source Project 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package nu.staldal.djdplayer; 18 | 19 | import android.database.Cursor; 20 | import android.provider.MediaStore; 21 | import android.widget.AlphabetIndexer; 22 | 23 | /** 24 | * Handles comparisons in a different way because the Album, Song and Artist name 25 | * are stripped of some prefixes such as "a", "an", "the" and some symbols. 26 | * 27 | */ 28 | public class MusicAlphabetIndexer extends AlphabetIndexer { 29 | 30 | public MusicAlphabetIndexer(Cursor cursor, int sortedColumnIndex, CharSequence alphabet) { 31 | super(cursor, sortedColumnIndex, alphabet); 32 | } 33 | 34 | @Override 35 | protected int compare(String word, String letter) { 36 | String wordKey = MediaStore.Audio.keyFor(word); 37 | String letterKey = MediaStore.Audio.keyFor(letter); 38 | if (wordKey.startsWith(letter)) { 39 | return 0; 40 | } else { 41 | return wordKey.compareTo(letterKey); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/SettingsActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2016 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | import android.app.Activity; 19 | import android.os.Bundle; 20 | 21 | public class SettingsActivity extends Activity { 22 | public static final String CLICK_ON_SONG = "clickonsong"; 23 | public static final String SHOW_ARTISTS_TAB = "show_artists_tab"; 24 | public static final String SHOW_ALBUMS_TAB = "show_albums_tab"; 25 | public static final String SHOW_GENRES_TAB = "show_genres_tab"; 26 | public static final String SHOW_FOLDERS_TAB = "show_folders_tab"; 27 | public static final String SHOW_PLAYLISTS_TAB = "show_playlists_tab"; 28 | public static final String MUSIC_FOLDER = "music_folder"; 29 | public static final String FADE_SECONDS = "fade_seconds"; 30 | public static final String CROSS_FADE = "cross_fade"; 31 | 32 | public static final String PLAYQUEUE = "queue"; 33 | public static final String CARDID = "cardid"; 34 | public static final String CURPOS = "curpos"; 35 | public static final String SEEKPOS = "seekpos"; 36 | public static final String REPEATMODE = "repeatmode"; 37 | public static final String NUMWEEKS = "numweeks"; 38 | public static final String ACTIVE_TAB = "ActiveTab"; 39 | 40 | // CLICK_ON_SONG values 41 | public static final String PLAY_NEXT = "PLAY_NEXT"; 42 | public static final String PLAY_NOW = "PLAY_NOW"; 43 | public static final String QUEUE = "QUEUE"; 44 | 45 | @Override 46 | public void onCreate(Bundle savedInstanceState) { 47 | super.onCreate(savedInstanceState); 48 | setTitle(R.string.settings); 49 | getFragmentManager().beginTransaction() 50 | .replace(android.R.id.content, new SettingsFragment()) 51 | .commit(); 52 | } 53 | } -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/SettingsFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | import android.os.Bundle; 19 | import android.preference.PreferenceFragment; 20 | 21 | public class SettingsFragment extends PreferenceFragment { 22 | @Override 23 | public void onCreate(Bundle savedInstanceState) { 24 | super.onCreate(savedInstanceState); 25 | addPreferencesFromResource(R.xml.preferences); 26 | } 27 | } -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/ShufflePlaylistTask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer; 17 | 18 | import android.content.Context; 19 | import android.os.AsyncTask; 20 | import android.provider.MediaStore; 21 | import android.widget.Toast; 22 | 23 | import java.util.Random; 24 | 25 | public class ShufflePlaylistTask extends AsyncTask { 26 | @SuppressWarnings("unused") 27 | private static final String LOGTAG = "ShufflePlaylistTask"; 28 | 29 | private final Context context; 30 | 31 | public ShufflePlaylistTask(Context context) { 32 | this.context = context; 33 | } 34 | 35 | @Override 36 | protected Void doInBackground(Object... params) { 37 | Random random = new Random(); 38 | long playlistId = (Long)params[0]; 39 | long[] songs = (long[])params[1]; 40 | for (int i=0; i < songs.length; i++) { 41 | int randomPosition = random.nextInt(songs.length); 42 | MediaStore.Audio.Playlists.Members.moveItem(context.getContentResolver(), playlistId, i, randomPosition); 43 | } 44 | 45 | return null; 46 | } 47 | 48 | @Override 49 | protected void onPostExecute(Void aVoid) { 50 | Toast.makeText(context, R.string.playlist_shuffled, Toast.LENGTH_SHORT).show(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/djdplayer/provider/CursorWithCountColumn.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.provider; 17 | 18 | import android.database.Cursor; 19 | import android.database.CursorWrapper; 20 | import android.provider.BaseColumns; 21 | 22 | public class CursorWithCountColumn extends CursorWrapper { 23 | final int[] counts; 24 | 25 | public CursorWithCountColumn(Cursor cursor, int[] counts) { 26 | super(cursor); 27 | this.counts = counts; 28 | } 29 | 30 | @Override 31 | public int getColumnCount() { 32 | return super.getColumnCount()+1; 33 | } 34 | 35 | @Override 36 | public int getColumnIndex(String columnName) { 37 | if (columnName.equals(BaseColumns._COUNT)) 38 | return super.getColumnCount(); 39 | else 40 | return super.getColumnIndex(columnName); 41 | } 42 | 43 | @Override 44 | public int getColumnIndexOrThrow(String columnName) { 45 | if (columnName.equals(BaseColumns._COUNT)) 46 | return super.getColumnCount(); 47 | else 48 | return super.getColumnIndexOrThrow(columnName); 49 | } 50 | 51 | @Override 52 | public String getColumnName(int columnIndex) { 53 | if (columnIndex == super.getColumnCount()) 54 | return BaseColumns._COUNT; 55 | else 56 | return super.getColumnName(columnIndex); 57 | } 58 | 59 | @Override 60 | public String[] getColumnNames() { 61 | String[] originalColumnNames = super.getColumnNames(); 62 | String[] ret = new String[originalColumnNames.length+1]; 63 | System.arraycopy(originalColumnNames, 0, ret, 0, originalColumnNames.length); 64 | ret[ret.length-1] = BaseColumns._COUNT; 65 | return ret; 66 | } 67 | 68 | @Override 69 | public int getInt(int columnIndex) { 70 | if (columnIndex == super.getColumnCount()) 71 | return counts[getPosition()]; 72 | else 73 | return super.getInt(columnIndex); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/nu/staldal/ui/WithSectionMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.ui; 17 | 18 | import android.view.View; 19 | 20 | public interface WithSectionMenu { 21 | void onCreateSectionMenu(View view); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/albumart_mp_unknown_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/albumart_mp_unknown_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/app_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_context_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_context_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_launcher_shortcut_music_playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_launcher_shortcut_music_playlist.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_add.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_clear_playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_clear_playlist.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_delete.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_eq.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_info_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_info_details.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_interleave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_interleave.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_play_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_play_clip.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_preferences.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_search.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_share.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_shuffle.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_uniqueify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_uniqueify.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_unzoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_unzoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_menu_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_menu_zoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_artist_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_artist_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_artist_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_artist_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_genre_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_genre_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_repeat_all_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_repeat_all_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_repeat_off_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_repeat_off_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_repeat_once_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_repeat_once_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_repeat_stopafter_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_repeat_stopafter_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_song_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_song_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_mp_song_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_mp_song_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/ic_section_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/ic_section_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/indicator_ic_mp_crossfading_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/indicator_ic_mp_crossfading_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/indicator_ic_mp_playing_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/indicator_ic_mp_playing_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/playlist_tile_drag.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/playlist_tile_drag.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/playlist_tile_longpress.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/playlist_tile_longpress.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/playlist_tile_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/playlist_tile_normal.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/playlist_tile_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/playlist_tile_pressed.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/playlist_tile_selected.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/playlist_tile_selected.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-hdpi/stat_notify_musicplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-hdpi/stat_notify_musicplayer.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/albumart_mp_unknown_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/albumart_mp_unknown_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/app_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_context_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_context_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_launcher_shortcut_music_playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_launcher_shortcut_music_playlist.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_add.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_clear_playlist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_clear_playlist.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_delete.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_eq.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_info_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_info_details.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_interleave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_interleave.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_play_clip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_play_clip.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_preferences.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_search.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_share.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_shuffle.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_uniqueify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_uniqueify.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_unzoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_unzoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_menu_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_menu_zoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_artist_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_artist_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_artist_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_artist_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_genre_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_genre_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_repeat_all_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_repeat_all_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_repeat_off_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_repeat_off_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_repeat_once_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_repeat_once_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_repeat_stopafter_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_repeat_stopafter_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_song_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_song_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_mp_song_playback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_mp_song_playback.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/ic_section_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/ic_section_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/indicator_ic_mp_crossfading_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/indicator_ic_mp_crossfading_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/indicator_ic_mp_playing_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/indicator_ic_mp_playing_list.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/playlist_tile_drag.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/playlist_tile_drag.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/playlist_tile_longpress.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/playlist_tile_longpress.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/playlist_tile_normal.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/playlist_tile_normal.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/playlist_tile_pressed.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/playlist_tile_pressed.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/playlist_tile_selected.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/playlist_tile_selected.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-mdpi/stat_notify_musicplayer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-mdpi/stat_notify_musicplayer.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/app_icon.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_context_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_context_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_add.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_delete.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_eq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_eq.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_info_details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_info_details.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_preferences.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_search.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_share.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_share.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_shuffle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_shuffle.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_unzoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_unzoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_menu_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_menu_zoom.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_mp_repeat_all_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_mp_repeat_all_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_mp_repeat_off_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_mp_repeat_off_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_mp_repeat_once_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_mp_repeat_once_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_mp_repeat_stopafter_btn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_mp_repeat_stopafter_btn.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/ic_section_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xhdpi/ic_section_menu.png -------------------------------------------------------------------------------- /src/main/res/drawable-xxhdpi/app_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/main/res/drawable-xxhdpi/app_icon.png -------------------------------------------------------------------------------- /src/main/res/layout/select_music_folder.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Play next 6 | Play now 7 | Queue last 8 | 9 | 10 | PLAY_NEXT 11 | PLAY_NOW 12 | QUEUE 13 | 14 | 15 | 16 | None 17 | 1 second 18 | 2 seconds 19 | 3 seconds 20 | 4 seconds 21 | 5 seconds 22 | 6 seconds 23 | 7 seconds 24 | 8 seconds 25 | 9 seconds 26 | 10 seconds 27 | 11 seconds 28 | 12 seconds 29 | 13 seconds 30 | 14 seconds 31 | 15 seconds 32 | 16 seconds 33 | 17 seconds 34 | 18 seconds 35 | 19 seconds 36 | 20 seconds 37 | 21 seconds 38 | 22 seconds 39 | 23 seconds 40 | 24 seconds 41 | 25 seconds 42 | 26 seconds 43 | 27 seconds 44 | 28 seconds 45 | 29 seconds 46 | 30 seconds 47 | 48 | 49 | 0 50 | 1 51 | 2 52 | 3 53 | 4 54 | 5 55 | 6 56 | 7 57 | 8 58 | 9 59 | 10 60 | 11 61 | 12 62 | 13 63 | 14 64 | 15 65 | 16 66 | 17 67 | 18 68 | 19 69 | 20 70 | 21 71 | 22 72 | 23 73 | 24 74 | 25 75 | 26 76 | 27 77 | 28 78 | 29 79 | 30 80 | 81 | 82 | -------------------------------------------------------------------------------- /src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #6633b5e5 4 | #ff5a5a5a 5 | -------------------------------------------------------------------------------- /src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 66dip 20 | 21 | 132dip 22 | 23 | -------------------------------------------------------------------------------- /src/main/res/values/strings2.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | 21 | 22 | , 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/BrowserFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2013 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.mobile; 17 | 18 | import android.app.ListFragment; 19 | import android.app.LoaderManager; 20 | import android.content.*; 21 | import android.database.Cursor; 22 | import android.net.Uri; 23 | import android.os.Bundle; 24 | import android.widget.CursorAdapter; 25 | import nu.staldal.djdplayer.MediaPlaybackService; 26 | 27 | public abstract class BrowserFragment extends ListFragment implements LoaderManager.LoaderCallbacks { 28 | 29 | protected CursorAdapter adapter; 30 | 31 | protected abstract CursorAdapter createListAdapter(); 32 | 33 | @Override 34 | public void onActivityCreated(Bundle savedInstanceState) { 35 | super.onActivityCreated(savedInstanceState); 36 | 37 | adapter = createListAdapter(); 38 | setListAdapter(adapter); 39 | 40 | getLoaderManager().initLoader(0, null, this); 41 | } 42 | 43 | @Override 44 | public void onLoadFinished(Loader loader, Cursor data) { 45 | // Swap the new cursor in. (The framework will take care of closing the old cursor once we return.) 46 | adapter.swapCursor(data); 47 | } 48 | 49 | @Override 50 | public void onLoaderReset(Loader loader) { 51 | // This is called when the last Cursor provided to onLoadFinished() 52 | // above is about to be closed. We need to make sure we are no longer using it. 53 | adapter.swapCursor(null); 54 | } 55 | 56 | @Override 57 | public void onResume() { 58 | super.onResume(); 59 | 60 | IntentFilter f = new IntentFilter(); 61 | f.addAction(MediaPlaybackService.META_CHANGED); 62 | f.addAction(MediaPlaybackService.QUEUE_CHANGED); 63 | getActivity().registerReceiver(statusListener, f); 64 | } 65 | 66 | @Override 67 | public void onPause() { 68 | getActivity().unregisterReceiver(statusListener); 69 | super.onPause(); 70 | } 71 | 72 | private final BroadcastReceiver statusListener = new BroadcastReceiver() { 73 | @Override 74 | public void onReceive(Context context, Intent intent) { 75 | getLoaderManager().restartLoader(0, null, BrowserFragment.this); 76 | } 77 | }; 78 | 79 | public boolean isPicking() { 80 | return Intent.ACTION_PICK.equals(getActivity().getIntent().getAction()) 81 | || Intent.ACTION_GET_CONTENT.equals(getActivity().getIntent().getAction()); 82 | } 83 | 84 | protected void viewCategory(Uri uri) { 85 | ((MusicBrowserActivity)getActivity()).onNewIntent(new Intent( 86 | isPicking() ? Intent.ACTION_PICK : Intent.ACTION_VIEW, 87 | uri)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/CategoryFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package nu.staldal.djdplayer.mobile; 18 | 19 | import android.os.Bundle; 20 | import android.view.LayoutInflater; 21 | import android.view.View; 22 | import android.view.ViewGroup; 23 | import android.widget.ListView; 24 | 25 | public abstract class CategoryFragment extends BrowserFragment { 26 | @Override 27 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { 28 | ListView listView = new ListView(getActivity()); 29 | listView.setId(android.R.id.list); 30 | listView.setFastScrollEnabled(true); 31 | listView.setTextFilterEnabled(true); 32 | 33 | registerForContextMenu(listView); 34 | 35 | return listView; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/MediaButtonIntentReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 The Android Open Source Project 3 | * Copyright (C) 2014-2015 Mikael Ståldal 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package nu.staldal.djdplayer.mobile; 19 | 20 | import android.content.BroadcastReceiver; 21 | import android.content.Context; 22 | import android.content.Intent; 23 | import android.util.Log; 24 | import android.view.KeyEvent; 25 | 26 | public class MediaButtonIntentReceiver extends BroadcastReceiver { 27 | private static final String LOGTAG = "MediaButtonIntentRecv"; 28 | 29 | private static long mLastClickTime = 0; 30 | private static boolean mDown = false; 31 | 32 | @Override 33 | public void onReceive(Context context, Intent intent) { 34 | if (Intent.ACTION_MEDIA_BUTTON.equals(intent.getAction())) { 35 | KeyEvent event = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); 36 | 37 | if (event == null) { 38 | return; 39 | } 40 | 41 | Log.d(LOGTAG, "Button: " + event.toString()); 42 | 43 | // single quick press: pause/resume. 44 | // double press: next track 45 | 46 | String action = null; 47 | switch (event.getKeyCode()) { 48 | case KeyEvent.KEYCODE_MEDIA_PLAY: 49 | action = nu.staldal.djdplayer.MediaPlaybackService.PLAY_ACTION; 50 | break; 51 | case KeyEvent.KEYCODE_MEDIA_PAUSE: 52 | action = nu.staldal.djdplayer.MediaPlaybackService.PAUSE_ACTION; 53 | break; 54 | case KeyEvent.KEYCODE_MEDIA_STOP: 55 | action = nu.staldal.djdplayer.MediaPlaybackService.STOP_ACTION; 56 | break; 57 | case KeyEvent.KEYCODE_HEADSETHOOK: 58 | case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: 59 | action = nu.staldal.djdplayer.MediaPlaybackService.TOGGLEPAUSE_ACTION; 60 | break; 61 | case KeyEvent.KEYCODE_MEDIA_NEXT: 62 | action = nu.staldal.djdplayer.MediaPlaybackService.NEXT_ACTION; 63 | break; 64 | case KeyEvent.KEYCODE_MEDIA_PREVIOUS: 65 | action = nu.staldal.djdplayer.MediaPlaybackService.PREVIOUS_ACTION; 66 | break; 67 | } 68 | 69 | if (action != null) { 70 | if (event.getAction() == KeyEvent.ACTION_DOWN) { 71 | if (!mDown) { 72 | // if this isn't a repeat event 73 | 74 | // The service may or may not be running, but we need to send it a command. 75 | Intent i = new Intent(context, MobileMediaPlaybackService.class); 76 | if (event.getKeyCode() == KeyEvent.KEYCODE_HEADSETHOOK && event.getEventTime() - mLastClickTime < 300) { 77 | action = nu.staldal.djdplayer.MediaPlaybackService.NEXT_ACTION; 78 | mLastClickTime = 0; 79 | } else { 80 | mLastClickTime = event.getEventTime(); 81 | } 82 | i.setAction(action); 83 | context.startService(i); 84 | 85 | mDown = true; 86 | } 87 | } else { 88 | mDown = false; 89 | } 90 | if (isOrderedBroadcast()) { 91 | abortBroadcast(); 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/NarrowPlayerFooterFragment.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.mobile; 17 | 18 | import nu.staldal.djdplayer.R; 19 | 20 | public class NarrowPlayerFooterFragment extends PlayerFooterFragment { 21 | 22 | @Override 23 | protected int getLayoutId() { 24 | return R.layout.narrow_player_footer; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/PlaylistShortcutActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.mobile; 17 | 18 | import android.app.Activity; 19 | import android.os.Bundle; 20 | import nu.staldal.djdplayer.R; 21 | 22 | public class PlaylistShortcutActivity extends Activity { 23 | @Override 24 | protected void onCreate(Bundle savedInstanceState) { 25 | super.onCreate(savedInstanceState); 26 | 27 | setContentView(R.layout.playlist_shortcut); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/RescanActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.mobile; 17 | 18 | import android.app.Activity; 19 | import android.content.Intent; 20 | import android.net.Uri; 21 | import android.os.Environment; 22 | import android.util.Log; 23 | import nu.staldal.djdplayer.MusicUtils; 24 | 25 | public class RescanActivity extends Activity { 26 | private static final String LOGTAG = "RescanActivity"; 27 | 28 | @Override 29 | protected void onStart() { 30 | super.onStart(); 31 | if (MusicUtils.android44OrLater()) { 32 | Log.w(LOGTAG, "Cannot rescan music on Android 4.4 or later"); 33 | } else { 34 | Log.i(LOGTAG, "Rescanning music"); 35 | sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.fromFile(Environment.getExternalStorageDirectory()))); 36 | } 37 | finish(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/mobile/java/nu/staldal/djdplayer/mobile/SimpleCursorAdapterWithContextMenu.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2014 Mikael Ståldal 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package nu.staldal.djdplayer.mobile; 17 | 18 | import android.content.Context; 19 | import android.database.Cursor; 20 | import android.view.View; 21 | import android.view.ViewGroup; 22 | import android.widget.SimpleCursorAdapter; 23 | import nu.staldal.djdplayer.R; 24 | 25 | public class SimpleCursorAdapterWithContextMenu extends SimpleCursorAdapter { 26 | 27 | public SimpleCursorAdapterWithContextMenu(Context context, int layout, Cursor c, String[] from, int[] to, int flags) { 28 | super(context, layout, c, from, to, flags); 29 | } 30 | 31 | @Override 32 | public View newView(Context context, Cursor cursor, ViewGroup parent) { 33 | View v = super.newView(context, cursor, parent); 34 | v.findViewById(R.id.context_menu).setOnClickListener(new View.OnClickListener() { 35 | @Override 36 | public void onClick(View v) { 37 | v.showContextMenu(); 38 | } 39 | }); 40 | return v; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/actionbar_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/appwidget_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 10 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/appwidget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/mobile/res/drawable/appwidget_preview.png -------------------------------------------------------------------------------- /src/mobile/res/drawable/appwidget_preview_w600dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mikaelstaldal/DJDPlayer/d4fe9deab79744300c93b23d6e2294aaf0d59aaa/src/mobile/res/drawable/appwidget_preview_w600dp.png -------------------------------------------------------------------------------- /src/mobile/res/drawable/button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/list_selector_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 26 | 28 | 29 | 31 | 33 | 34 | 36 | 37 | 39 | 40 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/list_selector_background_transition.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/nowplaying_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | -------------------------------------------------------------------------------- /src/mobile/res/drawable/playlist_tile.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | -------------------------------------------------------------------------------- /src/mobile/res/layout-h400dp/audio_player.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/mobile/res/layout-w500dp/music_browser_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 22 | 23 | 28 | 29 | 35 | 36 | 40 | 41 | 46 | 47 | 52 | 53 | 57 | 58 |