Added new dark icon

This commit is contained in:
hemanths@live.com 2019-01-14 17:47:22 +05:30
parent 0456914e2a
commit 9ea7735261
68 changed files with 306 additions and 249 deletions

View file

@ -32,8 +32,8 @@ android {
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic" applicationId "code.name.monkey.retromusic"
versionCode 277 versionCode 281
versionName '3.0.530' versionName '3.0.540'
multiDexEnabled true multiDexEnabled true
@ -166,6 +166,7 @@ dependencies {
implementation 'com.github.takahirom.downloadable.calligraphy:downloadable-calligraphy:0.1.3' implementation 'com.github.takahirom.downloadable.calligraphy:downloadable-calligraphy:0.1.3'
kapt 'com.github.bumptech.glide:compiler:4.8.0' kapt 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
} }
repositories { repositories {
mavenCentral() mavenCentral()

BIN
app/normal/release/app.aab Normal file

Binary file not shown.

View file

@ -1 +1 @@
<html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1em; } li { padding-top: 8px; } </style> </head> <body> <h4>v3.0.501</h4> <h3>Highlights</h3> <ul style="line-height=150%"> <li>Kotlin conversion from Good old Java</li> <li>Outline style system icons</li> <li>New Material Design principles and Guide lines</li> <li>Holiday Theme</li> </ul> <h3>Changelog</h3> <ul style="line-height:150%"> <li>Fixed app clear data when crash happens</li> <li>Updated translations</li> <li>By default theme will be dark</li> <li>Now you can add search app shortcut in home screen</li> <li>Last selected Lyrics options saved</li> <li>Fonts are removed to make it fast loading</li> <li>Now you can add plain text home screen widget</li> <li>Good old side navigation bar for options</li> <li>Bug report for better tracking with milestones</li> <li>Snow fall effect can be enable from other settings(Works only one normal theme)</li> <li>Click new music mix to play songs</li> <li>Gradient image option for gird list</li> <li>Clear button for playing queue</li> <li>Folder list back button</li> <li>New theme Fit</li> <li>On library click on toolbar for accessing main menu </li> <li>On home click on toolbar for accessing search </li> <li>BottomSheetDialogue is now adaptable to screens, background colour and text size consistency. </li> <li>Removed coloured navigation bar option to making app adapt the primary colour</li> <li>Swipe up gesture for now playing removed, replaced with "tap to open", To achieve transparent navigation bar for desired themes. </li> <li>Improved tablet UI and home screen by adding suggestions toggle banner issues.</li> <li>Improving lyrics page</li> <li>Updated image loading libraries(might loose your current artist images)</li> </ul> <p>If you see entire app white or dark or black select same theme in settings to fix </p> <p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a> </p> <p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p> </body> <html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1em; } li { padding-top: 8px; } </style> </head> <body> <h4>v3.0.540</h4> <h3>Highlights</h3> <ul style="line-height=150%"> <li>Kotlin conversion from Good old Java</li> <li>Outline style system icons</li> <li>New Material Design principles and Guide lines</li> <li>Holiday Theme</li> </ul> <h3>Changelog</h3> <ul style="line-height:150%"> <li>Fixed app clear data when crash happens</li> <li>Updated translations</li> <li>By default theme will be dark</li> <li>Now you can add search app shortcut in home screen</li> <li>Last selected Lyrics options saved</li> <li>Fonts are removed to make it fast loading</li> <li>Now you can add plain text home screen widget</li> <li>Good old side navigation bar for options</li> <li>Bug report for better tracking with milestones</li> <li>Snow fall effect can be enable from other settings(Works only one normal theme)</li> <li>Click new music mix to play songs</li> <li>Gradient image option for gird list</li> <li>Clear button for playing queue</li> <li>Folder list back button</li> <li>New theme Fit</li> <li>On library click on toolbar for accessing main menu </li> <li>On home click on toolbar for accessing search </li> <li>BottomSheetDialogue is now adaptable to screens, background colour and text size consistency. </li> <li>Removed coloured navigation bar option to making app adapt the primary colour</li> <li>Swipe up gesture for now playing removed, replaced with "tap to open", To achieve transparent navigation bar for desired themes. </li> <li>Improved tablet UI and home screen by adding suggestions toggle banner issues.</li> <li>Improving lyrics page</li> <li>Updated image loading libraries(might loose your current artist images)</li> </ul> <p>If you see entire app white or dark or black select same theme in settings to fix </p> <p style="line-height:150%"><a href="https://github.com/h4h13/RetroMusicPlayer/wiki/FAQ">FAQ's</a> </p> <p style="line-height:150%">*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again. </p> </body>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -9,6 +9,7 @@ import android.view.ViewGroup
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.model.PlaylistSong import code.name.monkey.retromusic.model.PlaylistSong
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.PlaylistsUtil import code.name.monkey.retromusic.util.PlaylistsUtil
import code.name.monkey.retromusic.views.RoundedBottomSheetDialogFragment import code.name.monkey.retromusic.views.RoundedBottomSheetDialogFragment
import kotlinx.android.synthetic.main.dialog_remove_from_playlist.* import kotlinx.android.synthetic.main.dialog_remove_from_playlist.*
@ -28,7 +29,7 @@ class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
val songs = arguments!!.getParcelableArrayList<PlaylistSong>("songs") val songs = arguments!!.getParcelableArrayList<PlaylistSong>("songs")
val title: Int val title: Int
val content: CharSequence val content: CharSequence
if (songs != null && songs.size > 1) { if (songs!!.size > 1) {
title = R.string.remove_songs_from_playlist_title title = R.string.remove_songs_from_playlist_title
content = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { content = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
Html.fromHtml(getString(R.string.remove_x_songs_from_playlist, songs.size), Html.FROM_HTML_MODE_LEGACY) Html.fromHtml(getString(R.string.remove_x_songs_from_playlist, songs.size), Html.FROM_HTML_MODE_LEGACY)
@ -37,7 +38,7 @@ class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
} }
} else { } else {
title = R.string.remove_song_from_playlist_title title = R.string.remove_song_from_playlist_title
content = Html.fromHtml(getString(R.string.remove_song_x_from_playlist, songs!![0].title)) content = Html.fromHtml(getString(R.string.remove_song_x_from_playlist, songs[0].title))
} }
actionRemove.text = content actionRemove.text = content
bannerTitle.setText(title) bannerTitle.setText(title)
@ -48,6 +49,7 @@ class RemoveFromPlaylistDialog : RoundedBottomSheetDialogFragment() {
actionRemove.setOnClickListener { actionRemove.setOnClickListener {
PlaylistsUtil.removeFromPlaylist(activity!!, songs) PlaylistsUtil.removeFromPlaylist(activity!!, songs)
dismiss()
} }
actionCancel.setOnClickListener { dismiss() } actionCancel.setOnClickListener { dismiss() }
} }

View file

@ -63,7 +63,7 @@ public final class RetroGlideExtension {
} }
public static Key createSignature(Song song) { public static Key createSignature(Song song) {
return new MediaStoreSignature("", song.getDateModified(), 0); return new MediaStoreSignature("", song.dateModified, 0);
} }
public static Object getArtistModel(Artist artist) { public static Object getArtistModel(Artist artist) {
@ -88,9 +88,9 @@ public final class RetroGlideExtension {
public static Object getSongModel(Song song, boolean ignoreMediaStore) { public static Object getSongModel(Song song, boolean ignoreMediaStore) {
if (ignoreMediaStore) { if (ignoreMediaStore) {
return new AudioFileCover(song.getData()); return new AudioFileCover(song.data);
} else { } else {
return MusicUtil.getMediaStoreAlbumCoverUri(song.getAlbumId()); return MusicUtil.getMediaStoreAlbumCoverUri(song.albumId);
} }
} }

View file

@ -32,7 +32,7 @@ object MusicPlayerRemote {
val currentSong: Song val currentSong: Song
get() = if (musicService != null) { get() = if (musicService != null) {
musicService!!.currentSong musicService!!.currentSong
} else Song.emptySong } else Song.EMPTY_SONG
/** /**
* Async * Async

View file

@ -2,8 +2,6 @@ package code.name.monkey.retromusic.helper
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import java.util.Collections
object ShuffleHelper { object ShuffleHelper {

View file

@ -39,10 +39,7 @@ object GenreMenuHelper {
return false return false
} }
private fun getGenreSongs(activity: Activity, private fun getGenreSongs(activity: Activity, genre: Genre): ArrayList<Song> {
genre: Genre): ArrayList<Song> { return GenreLoader.getSongs(activity, genre.id).blockingFirst()
val songs: ArrayList<Song>
songs = GenreLoader.getSongs(activity, genre.id).blockingFirst()
return songs
} }
} }

View file

@ -86,7 +86,7 @@ open class AlbumLoader {
} }
} }
fun getSongLoaderSortOrder(): String { private fun getSongLoaderSortOrder(): String {
return PreferenceUtil.getInstance().albumSortOrder + ", " + return PreferenceUtil.getInstance().albumSortOrder + ", " +
//PreferenceUtil.getInstance().getAlbumSongSortOrder() + "," + //PreferenceUtil.getInstance().getAlbumSongSortOrder() + "," +
PreferenceUtil.getInstance().albumDetailSongSortOrder PreferenceUtil.getInstance().albumDetailSongSortOrder

View file

@ -2,9 +2,7 @@ package code.name.monkey.retromusic.loaders
import android.content.Context import android.content.Context
import code.name.monkey.retromusic.misc.DisposingObserver
import code.name.monkey.retromusic.model.Playlist import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist import code.name.monkey.retromusic.model.smartplaylist.AbsSmartPlaylist
import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist import code.name.monkey.retromusic.model.smartplaylist.HistoryPlaylist
import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist import code.name.monkey.retromusic.model.smartplaylist.LastAddedPlaylist

View file

@ -58,7 +58,7 @@ object SongLoader {
val artistId = cursor.getInt(9) val artistId = cursor.getInt(9)
val artistName = cursor.getString(10) val artistName = cursor.getString(10)
return Song(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName, return Song(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName?:"",
artistId, artistName) artistId, artistName)
} }
@ -119,7 +119,7 @@ object SongLoader {
val song: Song = if (cursor != null && cursor.moveToFirst()) { val song: Song = if (cursor != null && cursor.moveToFirst()) {
getSongFromCursorImpl(cursor) getSongFromCursorImpl(cursor)
} else { } else {
Song.emptySong Song.EMPTY_SONG
} }
cursor?.close() cursor?.close()
e.onNext(song) e.onNext(song)

View file

@ -36,6 +36,6 @@ class Album {
} }
fun safeGetFirstSong(): Song { fun safeGetFirstSong(): Song {
return if (songs!!.isEmpty()) Song.emptySong else songs[0] return if (songs!!.isEmpty()) Song.EMPTY_SONG else songs[0]
} }
} }

View file

@ -1,18 +1,10 @@
package code.name.monkey.retromusic.model; package code.name.monkey.retromusic.model;
import android.os.Parcel; import android.os.Parcel;
import android.os.Parcelable;
public class PlaylistSong extends Song { public class PlaylistSong extends Song {
public static final Parcelable.Creator<PlaylistSong> CREATOR = new Parcelable.Creator<PlaylistSong>() { public static PlaylistSong EMPTY_PLAYLIST_SONG = new PlaylistSong(-1, "", -1, -1, -1, "", -1, -1, "", -1, "", -1, -1);
public PlaylistSong createFromParcel(Parcel source) {
return new PlaylistSong(source);
}
public PlaylistSong[] newArray(int size) {
return new PlaylistSong[size];
}
};
public final int playlistId; public final int playlistId;
public final int idInPlayList; public final int idInPlayList;
@ -22,12 +14,6 @@ public class PlaylistSong extends Song {
this.idInPlayList = idInPlayList; this.idInPlayList = idInPlayList;
} }
protected PlaylistSong(Parcel in) {
super(in);
this.playlistId = in.readInt();
this.idInPlayList = in.readInt();
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) return true; if (this == o) return true;
@ -58,6 +44,7 @@ public class PlaylistSong extends Song {
'}'; '}';
} }
@Override @Override
public int describeContents() { public int describeContents() {
return 0; return 0;
@ -69,4 +56,20 @@ public class PlaylistSong extends Song {
dest.writeInt(this.playlistId); dest.writeInt(this.playlistId);
dest.writeInt(this.idInPlayList); dest.writeInt(this.idInPlayList);
} }
protected PlaylistSong(Parcel in) {
super(in);
this.playlistId = in.readInt();
this.idInPlayList = in.readInt();
}
public static final Creator<PlaylistSong> CREATOR = new Creator<PlaylistSong>() {
public PlaylistSong createFromParcel(Parcel source) {
return new PlaylistSong(source);
}
public PlaylistSong[] newArray(int size) {
return new PlaylistSong[size];
}
};
} }

View file

@ -0,0 +1,137 @@
package code.name.monkey.retromusic.model;
import android.os.Parcel;
import android.os.Parcelable;
/**
* @author Karim Abou Zeid (kabouzeid)
*/
public class Song implements Parcelable {
public static final Song EMPTY_SONG = new Song(-1, "", -1, -1, -1, "", -1, -1, "", -1, "");
public final int id;
public final String title;
public final int trackNumber;
public final int year;
public final long duration;
public final String data;
public final long dateModified;
public final int albumId;
public final String albumName;
public final int artistId;
public final String artistName;
public Song(int id, String title, int trackNumber, int year, long duration, String data, long dateModified, int albumId, String albumName, int artistId, String artistName) {
this.id = id;
this.title = title;
this.trackNumber = trackNumber;
this.year = year;
this.duration = duration;
this.data = data;
this.dateModified = dateModified;
this.albumId = albumId;
this.albumName = albumName;
this.artistId = artistId;
this.artistName = artistName;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Song song = (Song) o;
if (id != song.id) return false;
if (trackNumber != song.trackNumber) return false;
if (year != song.year) return false;
if (duration != song.duration) return false;
if (dateModified != song.dateModified) return false;
if (albumId != song.albumId) return false;
if (artistId != song.artistId) return false;
if (title != null ? !title.equals(song.title) : song.title != null) return false;
if (data != null ? !data.equals(song.data) : song.data != null) return false;
if (albumName != null ? !albumName.equals(song.albumName) : song.albumName != null)
return false;
return artistName != null ? artistName.equals(song.artistName) : song.artistName == null;
}
@Override
public int hashCode() {
int result = id;
result = 31 * result + (title != null ? title.hashCode() : 0);
result = 31 * result + trackNumber;
result = 31 * result + year;
result = 31 * result + (int) (duration ^ (duration >>> 32));
result = 31 * result + (data != null ? data.hashCode() : 0);
result = 31 * result + (int) (dateModified ^ (dateModified >>> 32));
result = 31 * result + albumId;
result = 31 * result + (albumName != null ? albumName.hashCode() : 0);
result = 31 * result + artistId;
result = 31 * result + (artistName != null ? artistName.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Song{" +
"id=" + id +
", title='" + title + '\'' +
", trackNumber=" + trackNumber +
", year=" + year +
", duration=" + duration +
", data='" + data + '\'' +
", dateModified=" + dateModified +
", albumId=" + albumId +
", albumName='" + albumName + '\'' +
", artistId=" + artistId +
", artistName='" + artistName + '\'' +
'}';
}
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(this.id);
dest.writeString(this.title);
dest.writeInt(this.trackNumber);
dest.writeInt(this.year);
dest.writeLong(this.duration);
dest.writeString(this.data);
dest.writeLong(this.dateModified);
dest.writeInt(this.albumId);
dest.writeString(this.albumName);
dest.writeInt(this.artistId);
dest.writeString(this.artistName);
}
protected Song(Parcel in) {
this.id = in.readInt();
this.title = in.readString();
this.trackNumber = in.readInt();
this.year = in.readInt();
this.duration = in.readLong();
this.data = in.readString();
this.dateModified = in.readLong();
this.albumId = in.readInt();
this.albumName = in.readString();
this.artistId = in.readInt();
this.artistName = in.readString();
}
public static final Creator<Song> CREATOR = new Creator<Song>() {
public Song createFromParcel(Parcel source) {
return new Song(source);
}
public Song[] newArray(int size) {
return new Song[size];
}
};
}

View file

@ -1,81 +0,0 @@
package code.name.monkey.retromusic.model
import android.os.Parcel
import android.os.Parcelable
open class Song : Parcelable {
val id: Int
val title: String?
val trackNumber: Int
val year: Int
val duration: Long
val data: String?
val dateModified: Long
val albumId: Int
val albumName: String?
val artistId: Int
val artistName: String?
constructor(id: Int, title: String, trackNumber: Int, year: Int, duration: Long, data: String, dateModified: Long, albumId: Int, albumName: String, artistId: Int, artistName: String) {
this.id = id
this.title = title
this.trackNumber = trackNumber
this.year = year
this.duration = duration
this.data = data
this.dateModified = dateModified
this.albumId = albumId
this.albumName = albumName
this.artistId = artistId
this.artistName = artistName
}
protected constructor(`in`: Parcel) {
this.id = `in`.readInt()
this.title = `in`.readString()
this.trackNumber = `in`.readInt()
this.year = `in`.readInt()
this.duration = `in`.readLong()
this.data = `in`.readString()
this.dateModified = `in`.readLong()
this.albumId = `in`.readInt()
this.albumName = `in`.readString()
this.artistId = `in`.readInt()
this.artistName = `in`.readString()
}
override fun describeContents(): Int {
return 0
}
override fun writeToParcel(dest: Parcel, flags: Int) {
dest.writeInt(this.id)
dest.writeString(this.title)
dest.writeInt(this.trackNumber)
dest.writeInt(this.year)
dest.writeLong(this.duration)
dest.writeString(this.data)
dest.writeLong(this.dateModified)
dest.writeInt(this.albumId)
dest.writeString(this.albumName)
dest.writeInt(this.artistId)
dest.writeString(this.artistName)
}
companion object {
var emptySong = Song(-1, "", -1, -1, -1, "", -1, -1, "", -1, "")
@JvmField
val CREATOR: Parcelable.Creator<Song> = object : Parcelable.Creator<Song> {
override fun createFromParcel(source: Parcel): Song {
return Song(source)
}
override fun newArray(size: Int): Array<Song> {
return emptyArray()
}
}
}
}

View file

@ -1,13 +1,8 @@
package code.name.monkey.retromusic.mvp.contract package code.name.monkey.retromusic.mvp.contract
import code.name.monkey.retromusic.model.*
import java.util.ArrayList import java.util.ArrayList
import code.name.monkey.retromusic.model.AbsCustomPlaylist
import code.name.monkey.retromusic.model.Album
import code.name.monkey.retromusic.model.Artist
import code.name.monkey.retromusic.model.Genre
import code.name.monkey.retromusic.model.Playlist
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.mvp.BasePresenter import code.name.monkey.retromusic.mvp.BasePresenter
import code.name.monkey.retromusic.mvp.BaseView import code.name.monkey.retromusic.mvp.BaseView

View file

@ -162,17 +162,17 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
Song song = queue.get(i); Song song = queue.get(i);
ContentValues values = new ContentValues(4); ContentValues values = new ContentValues(4);
values.put(BaseColumns._ID, song.getId()); values.put(BaseColumns._ID, song.id);
values.put(AudioColumns.TITLE, song.getTitle()); values.put(AudioColumns.TITLE, song.title);
values.put(AudioColumns.TRACK, song.getTrackNumber()); values.put(AudioColumns.TRACK, song.trackNumber);
values.put(AudioColumns.YEAR, song.getYear()); values.put(AudioColumns.YEAR, song.year);
values.put(AudioColumns.DURATION, song.getDuration()); values.put(AudioColumns.DURATION, song.duration);
values.put(AudioColumns.DATA, song.getData()); values.put(AudioColumns.DATA, song.data);
values.put(AudioColumns.DATE_MODIFIED, song.getDateModified()); values.put(AudioColumns.DATE_MODIFIED, song.dateModified);
values.put(AudioColumns.ALBUM_ID, song.getAlbumId()); values.put(AudioColumns.ALBUM_ID, song.albumId);
values.put(AudioColumns.ALBUM, song.getAlbumName()); values.put(AudioColumns.ALBUM, song.albumName);
values.put(AudioColumns.ARTIST_ID, song.getArtistId()); values.put(AudioColumns.ARTIST_ID, song.artistId);
values.put(AudioColumns.ARTIST, song.getArtistName()); values.put(AudioColumns.ARTIST, song.artistName);
database.insert(tableName, null, values); database.insert(tableName, null, values);
} }

View file

@ -248,7 +248,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
}; };
private static String getTrackUri(@NonNull Song song) { private static String getTrackUri(@NonNull Song song) {
return MusicUtil.getSongFileUri(song.getId()).toString(); return MusicUtil.getSongFileUri(song.id).toString();
} }
private static Bitmap copy(Bitmap bitmap) { private static Bitmap copy(Bitmap bitmap) {
@ -649,7 +649,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
} }
public void updateNotification() { public void updateNotification() {
if (playingNotification != null && getCurrentSong().getId() != -1) { if (playingNotification != null && getCurrentSong().id != -1) {
playingNotification.update(); playingNotification.update();
} }
} }
@ -666,19 +666,19 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
private void updateMediaSessionMetaData() { private void updateMediaSessionMetaData() {
final Song song = getCurrentSong(); final Song song = getCurrentSong();
if (song.getId() == -1) { if (song.id == -1) {
mediaSession.setMetadata(null); mediaSession.setMetadata(null);
return; return;
} }
final MediaMetadataCompat.Builder metaData = new MediaMetadataCompat.Builder() final MediaMetadataCompat.Builder metaData = new MediaMetadataCompat.Builder()
.putString(MediaMetadataCompat.METADATA_KEY_ARTIST, song.getArtistName()) .putString(MediaMetadataCompat.METADATA_KEY_ARTIST, song.artistName)
.putString(MediaMetadataCompat.METADATA_KEY_ALBUM_ARTIST, song.getArtistName()) .putString(MediaMetadataCompat.METADATA_KEY_ALBUM_ARTIST, song.artistName)
.putString(MediaMetadataCompat.METADATA_KEY_ALBUM, song.getAlbumName()) .putString(MediaMetadataCompat.METADATA_KEY_ALBUM, song.albumName)
.putString(MediaMetadataCompat.METADATA_KEY_TITLE, song.getTitle()) .putString(MediaMetadataCompat.METADATA_KEY_TITLE, song.title)
.putLong(MediaMetadataCompat.METADATA_KEY_DURATION, song.getDuration()) .putLong(MediaMetadataCompat.METADATA_KEY_DURATION, song.duration)
.putLong(MediaMetadataCompat.METADATA_KEY_TRACK_NUMBER, getPosition() + 1) .putLong(MediaMetadataCompat.METADATA_KEY_TRACK_NUMBER, getPosition() + 1)
.putLong(MediaMetadataCompat.METADATA_KEY_YEAR, song.getYear()) .putLong(MediaMetadataCompat.METADATA_KEY_YEAR, song.year)
.putBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART, null); .putBitmap(MediaMetadataCompat.METADATA_KEY_ALBUM_ART, null);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
@ -730,7 +730,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
if (position >= 0 && position < getPlayingQueue().size()) { if (position >= 0 && position < getPlayingQueue().size()) {
return getPlayingQueue().get(position); return getPlayingQueue().get(position);
} else { } else {
return Song.Companion.getEmptySong(); return Song.EMPTY_SONG;
} }
} }
@ -847,13 +847,13 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
public void removeSong(@NonNull Song song) { public void removeSong(@NonNull Song song) {
for (int i = 0; i < playingQueue.size(); i++) { for (int i = 0; i < playingQueue.size(); i++) {
if (playingQueue.get(i).getId() == song.getId()) { if (playingQueue.get(i).id == song.id) {
playingQueue.remove(i); playingQueue.remove(i);
rePosition(i); rePosition(i);
} }
} }
for (int i = 0; i < originalPlayingQueue.size(); i++) { for (int i = 0; i < originalPlayingQueue.size(); i++) {
if (originalPlayingQueue.get(i).getId() == song.getId()) { if (originalPlayingQueue.get(i).id == song.id) {
originalPlayingQueue.remove(i); originalPlayingQueue.remove(i);
} }
} }
@ -1019,7 +1019,7 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
public long getQueueDurationMillis(int position) { public long getQueueDurationMillis(int position) {
long duration = 0; long duration = 0;
for (int i = position + 1; i < playingQueue.size(); i++) for (int i = position + 1; i < playingQueue.size(); i++)
duration += playingQueue.get(i).getDuration(); duration += playingQueue.get(i).duration;
return duration; return duration;
} }
@ -1073,11 +1073,11 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
break; break;
case SHUFFLE_MODE_NONE: case SHUFFLE_MODE_NONE:
this.shuffleMode = shuffleMode; this.shuffleMode = shuffleMode;
int currentSongId = getCurrentSong().getId(); int currentSongId = getCurrentSong().id;
playingQueue = new ArrayList<>(originalPlayingQueue); playingQueue = new ArrayList<>(originalPlayingQueue);
int newPosition = 0; int newPosition = 0;
for (Song song : getPlayingQueue()) { for (Song song : getPlayingQueue()) {
if (song.getId() == currentSongId) { if (song.id == currentSongId) {
newPosition = getPlayingQueue().indexOf(song); newPosition = getPlayingQueue().indexOf(song);
} }
} }
@ -1104,11 +1104,11 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
final Song song = getCurrentSong(); final Song song = getCurrentSong();
intent.putExtra("id", song.getId()); intent.putExtra("id", song.id);
intent.putExtra("artist", song.getArtistName()); intent.putExtra("artist", song.artistName);
intent.putExtra("album", song.getAlbumName()); intent.putExtra("album", song.albumName);
intent.putExtra("track", song.getTitle()); intent.putExtra("track", song.title);
intent.putExtra("duration", song.getDuration()); intent.putExtra("duration", song.duration);
intent.putExtra("position", (long) getSongProgressMillis()); intent.putExtra("position", (long) getSongProgressMillis());
intent.putExtra("playing", isPlaying()); intent.putExtra("playing", isPlaying());
intent.putExtra("scrobbling_source", RETRO_MUSIC_PACKAGE_NAME); intent.putExtra("scrobbling_source", RETRO_MUSIC_PACKAGE_NAME);
@ -1143,9 +1143,9 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
savePosition(); savePosition();
savePositionInTrack(); savePositionInTrack();
final Song currentSong = getCurrentSong(); final Song currentSong = getCurrentSong();
HistoryStore.getInstance(this).addSongId(currentSong.getId()); HistoryStore.getInstance(this).addSongId(currentSong.id);
if (songPlayCountHelper.shouldBumpPlayCount()) { if (songPlayCountHelper.shouldBumpPlayCount()) {
SongPlayCountStore.getInstance(this).bumpPlayCount(songPlayCountHelper.getSong().getId()); SongPlayCountStore.getInstance(this).bumpPlayCount(songPlayCountHelper.getSong().id);
} }
songPlayCountHelper.notifySongChanged(currentSong); songPlayCountHelper.notifySongChanged(currentSong);
break; break;
@ -1375,14 +1375,14 @@ public class MusicService extends Service implements SharedPreferences.OnSharedP
public static final String TAG = SongPlayCountHelper.class.getSimpleName(); public static final String TAG = SongPlayCountHelper.class.getSimpleName();
private StopWatch stopWatch = new StopWatch(); private StopWatch stopWatch = new StopWatch();
private Song song = Song.Companion.getEmptySong(); private Song song = Song.EMPTY_SONG;
public Song getSong() { public Song getSong() {
return song; return song;
} }
boolean shouldBumpPlayCount() { boolean shouldBumpPlayCount() {
return song.getDuration() * 0.5d < stopWatch.getElapsedTime(); return song.duration * 0.5d < stopWatch.getElapsedTime();
} }
void notifySongChanged(Song song) { void notifySongChanged(Song song) {

View file

@ -241,9 +241,9 @@ public class WearBrowserService extends MediaBrowserService {
List<Song> songList = SongLoader.INSTANCE.getAllSongs(mContext).blockingFirst(); List<Song> songList = SongLoader.INSTANCE.getAllSongs(mContext).blockingFirst();
for (Song song : songList) { for (Song song : songList) {
fillMediaItems(mediaItems, fillMediaItems(mediaItems,
String.valueOf(song.getId()), String.valueOf(song.id),
song.getTitle(), song.title,
song.getArtistName(), song.albumName,
Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"), Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"),
MediaBrowser.MediaItem.FLAG_PLAYABLE); MediaBrowser.MediaItem.FLAG_PLAYABLE);
} }
@ -253,9 +253,9 @@ public class WearBrowserService extends MediaBrowserService {
List<Song> albumSongList = AlbumLoader.Companion.getAlbum(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst().getSongs(); List<Song> albumSongList = AlbumLoader.Companion.getAlbum(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst().getSongs();
for (Song song : albumSongList) { for (Song song : albumSongList) {
fillMediaItems(mediaItems, fillMediaItems(mediaItems,
String.valueOf(song.getId()), String.valueOf(song.id),
song.getTitle(), song.title,
song.getArtistName(), song.albumName,
Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"), Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"),
MediaBrowser.MediaItem.FLAG_PLAYABLE); MediaBrowser.MediaItem.FLAG_PLAYABLE);
} }
@ -264,9 +264,9 @@ public class WearBrowserService extends MediaBrowserService {
List<Song> artistSongs = ArtistLoader.INSTANCE.getArtist(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst().getSongs(); List<Song> artistSongs = ArtistLoader.INSTANCE.getArtist(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst().getSongs();
for (Song song : artistSongs) { for (Song song : artistSongs) {
fillMediaItems(mediaItems, fillMediaItems(mediaItems,
String.valueOf(song.getId()), String.valueOf(song.id),
song.getTitle(), song.title,
song.getAlbumName(), song.albumName,
Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"), Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"),
MediaBrowser.MediaItem.FLAG_PLAYABLE); MediaBrowser.MediaItem.FLAG_PLAYABLE);
} }
@ -288,9 +288,9 @@ public class WearBrowserService extends MediaBrowserService {
List<Song> playlistSongs = PlaylistSongsLoader.INSTANCE.getPlaylistSongList(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst(); List<Song> playlistSongs = PlaylistSongsLoader.INSTANCE.getPlaylistSongList(mContext, Integer.parseInt(parentId.substring(1))).blockingFirst();
for (Song song : playlistSongs) { for (Song song : playlistSongs) {
fillMediaItems(mediaItems, fillMediaItems(mediaItems,
String.valueOf(song.getId()), String.valueOf(song.id),
song.getTitle(), song.title,
song.getAlbumName(), song.albumName,
Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"), Uri.parse("android.resource://code.name.monkey.retromusic/drawable/default_album_art"),
MediaBrowser.MediaItem.FLAG_PLAYABLE); MediaBrowser.MediaItem.FLAG_PLAYABLE);
} }

View file

@ -82,7 +82,7 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
setUpViews() setUpViews()
artistDetailsPresenter = ArtistDetailsPresenter(this, intent.extras) artistDetailsPresenter = ArtistDetailsPresenter(this, intent.extras!!)
artistDetailsPresenter!!.subscribe() artistDetailsPresenter!!.subscribe()
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int -> contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->

View file

@ -195,7 +195,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
} }
private fun setToolbarTitle(title: String) { private fun setToolbarTitle(title: String) {
supportActionBar!!.title = title supportActionBar!!.title = title
} }
@ -230,11 +229,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
super.onDestroy() super.onDestroy()
} }
override fun onPlayingMetaChanged() {
super.onPlayingMetaChanged()
songsPresenter!!.subscribe()
}
override fun loading() {} override fun loading() {}
override fun showEmptyView() { override fun showEmptyView() {
@ -249,7 +243,6 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
} }
companion object { companion object {
var EXTRA_PLAYLIST = "extra_playlist" var EXTRA_PLAYLIST = "extra_playlist"
} }
} }

View file

@ -13,6 +13,7 @@ import android.view.ViewGroup
import android.widget.TextView import android.widget.TextView
import android.widget.Toast import android.widget.Toast
import androidx.annotation.LayoutRes import androidx.annotation.LayoutRes
import androidx.annotation.UiThread
import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.DefaultItemAnimator
import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -63,6 +64,7 @@ class SupportDevelopmentActivity : AbsBaseActivity(), BillingProcessor.IBillingH
setContentView(R.layout.activity_donation) setContentView(R.layout.activity_donation)
setStatusbarColorAuto() setStatusbarColorAuto()
setNavigationbarColorAuto() setNavigationbarColorAuto()
setTaskDescriptionColorAuto() setTaskDescriptionColorAuto()

View file

@ -26,7 +26,6 @@ import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
import java.util.* import java.util.*

View file

@ -61,7 +61,7 @@ abstract class AbsOffsetSongAdapter : SongAdapter {
override// could also return null, just to be safe return empty song override// could also return null, just to be safe return empty song
val song: Song val song: Song
get() = if (itemViewType == OFFSET_ITEM) Song.emptySong else dataSet[adapterPosition - 1] get() = if (itemViewType == OFFSET_ITEM) Song.EMPTY_SONG else dataSet[adapterPosition - 1]
override fun onClick(v: View?) { override fun onClick(v: View?) {
if (isInQuickSelectMode && itemViewType != OFFSET_ITEM) { if (isInQuickSelectMode && itemViewType != OFFSET_ITEM) {

View file

@ -24,7 +24,7 @@ class OrderablePlaylistSongAdapter(activity: AppCompatActivity,
private val onMoveItemListener: OnMoveItemListener?) : PlaylistSongAdapter(activity, dataSet, itemLayoutRes, usePalette, cabHolder), DraggableItemAdapter<OrderablePlaylistSongAdapter.ViewHolder> { private val onMoveItemListener: OnMoveItemListener?) : PlaylistSongAdapter(activity, dataSet, itemLayoutRes, usePalette, cabHolder), DraggableItemAdapter<OrderablePlaylistSongAdapter.ViewHolder> {
init { init {
setMultiSelectMenuRes(R.menu.menu_playlists_songs_selection) setMultiSelectMenuRes(code.name.monkey.retromusic.R.menu.menu_playlists_songs_selection)
} }
override fun createViewHolder(view: View): SongAdapter.ViewHolder { override fun createViewHolder(view: View): SongAdapter.ViewHolder {
@ -49,9 +49,7 @@ class OrderablePlaylistSongAdapter(activity: AppCompatActivity,
override fun onMultipleItemAction(menuItem: MenuItem, selection: ArrayList<Song>) { override fun onMultipleItemAction(menuItem: MenuItem, selection: ArrayList<Song>) {
when (menuItem.itemId) { when (menuItem.itemId) {
R.id.action_remove_from_playlist -> { R.id.action_remove_from_playlist -> {
val songs = ArrayList<PlaylistSong>() RemoveFromPlaylistDialog.create(selection as ArrayList<PlaylistSong>).show(activity.supportFragmentManager, "ADD_PLAYLIST")
songs.addAll(songs)
RemoveFromPlaylistDialog.create(songs).show(activity.supportFragmentManager, "ADD_PLAYLIST")
return return
} }
} }
@ -94,8 +92,8 @@ class OrderablePlaylistSongAdapter(activity: AppCompatActivity,
private var mDragStateFlags: Int = 0 private var mDragStateFlags: Int = 0
override var songMenuRes: Int override var songMenuRes: Int
get() = R.menu.menu_item_playlist_song get() = code.name.monkey.retromusic.R.menu.menu_item_playlist_song
set(value: Int) { set(value) {
super.songMenuRes = value super.songMenuRes = value
} }
@ -111,7 +109,7 @@ class OrderablePlaylistSongAdapter(activity: AppCompatActivity,
override fun onSongMenuItemClick(item: MenuItem): Boolean { override fun onSongMenuItemClick(item: MenuItem): Boolean {
when (item.itemId) { when (item.itemId) {
R.id.action_remove_from_playlist -> { code.name.monkey.retromusic.R.id.action_remove_from_playlist -> {
RemoveFromPlaylistDialog.create(song as PlaylistSong).show(activity.supportFragmentManager, "REMOVE_FROM_PLAYLIST") RemoveFromPlaylistDialog.create(song as PlaylistSong).show(activity.supportFragmentManager, "REMOVE_FROM_PLAYLIST")
return true return true
} }
@ -130,7 +128,6 @@ class OrderablePlaylistSongAdapter(activity: AppCompatActivity,
} }
companion object { companion object {
val TAG: String = OrderablePlaylistSongAdapter::class.java.simpleName
val TAG = OrderablePlaylistSongAdapter::class.java.simpleName
} }
} }

View file

@ -2,14 +2,12 @@ package code.name.monkey.retromusic.ui.adapter.song
import android.view.MenuItem import android.view.MenuItem
import android.view.View import android.view.View
import android.widget.ImageView
import androidx.annotation.LayoutRes import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.app.AppCompatActivity
import androidx.core.util.Pair import androidx.core.util.Pair
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.interfaces.CabHolder import code.name.monkey.retromusic.interfaces.CabHolder
import code.name.monkey.retromusic.model.PlaylistSong
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.NavigationUtil

View file

@ -12,7 +12,6 @@ import android.view.ViewGroup
import android.widget.SeekBar import android.widget.SeekBar
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
@ -95,17 +94,14 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
} }
fun tintWhiteColor() { fun tintWhiteColor() {
setProgressBarColor(Color.WHITE) setTintable(Color.WHITE)
} }
private fun setProgressBarColor(newColor: Int) { private fun setProgressBarColor(newColor: Int) {
val text = ColorStateList(arrayOf(intArrayOf(-android.R.attr.state_checked), intArrayOf(android.R.attr.state_checked)), intArrayOf(ThemeStore.textColorSecondary(context!!), ThemeStore.textColorPrimary(context!!))) volumeSeekBar.thumbTintList = ColorStateList.valueOf(newColor)
volumeSeekBar.progressTintList = ColorStateList.valueOf(newColor)
volumeSeekBar.progressTintList = text volumeSeekBar.progressBackgroundTintList = ColorStateList.valueOf(newColor)
volumeSeekBar.progressBackgroundTintList = text
//TintHelper.setTint(volumeSeekBar, newColor, false)
volumeDown.setColorFilter(newColor, PorterDuff.Mode.SRC_IN) volumeDown.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
volumeUp.setColorFilter(newColor, PorterDuff.Mode.SRC_IN) volumeUp.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
} }

View file

@ -364,7 +364,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
File file1 = (File) extra; File file1 = (File) extra;
int startIndex = -1; int startIndex = -1;
for (int i = 0; i < songs.size(); i++) { for (int i = 0; i < songs.size(); i++) {
if (file1.getPath().equals(songs.get(i).getData())) { // path is already canonical here if (file1.getPath().equals(songs.get(i).data)) { // path is already canonical here
startIndex = i; startIndex = i;
break; break;
} }

View file

@ -14,6 +14,7 @@ import android.view.animation.DecelerateInterpolator
import android.view.animation.LinearInterpolator import android.view.animation.LinearInterpolator
import android.widget.SeekBar import android.widget.SeekBar
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper import code.name.monkey.appthemehelper.util.TintHelper
@ -129,8 +130,12 @@ class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {
private fun setProgressBarColor(newColor: Int) { private fun setProgressBarColor(newColor: Int) {
val ld = progressSlider.progressDrawable as LayerDrawable val ld = progressSlider.progressDrawable as LayerDrawable
val clipDrawable = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable val clipDrawableProgress = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN) clipDrawableProgress.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
val clipDrawableBackground = ld.findDrawableByLayerId(android.R.id.background)
clipDrawableBackground.setColorFilter(MaterialValueHelper.getPrimaryDisabledTextColor(context!!, ColorUtil.isColorLight(ThemeStore.primaryColor(context!!))), PorterDuff.Mode.SRC_IN)
} }
private fun setUpPlayPauseFab() { private fun setUpPlayPauseFab() {

View file

@ -1,8 +1,11 @@
package code.name.monkey.retromusic.ui.fragments.player.color package code.name.monkey.retromusic.ui.fragments.player.color
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.content.res.ColorStateList
import android.graphics.Color import android.graphics.Color
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.graphics.drawable.ClipDrawable
import android.graphics.drawable.LayerDrawable
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
@ -21,7 +24,7 @@ import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.ui.fragments.VolumeFragment import code.name.monkey.retromusic.ui.fragments.VolumeFragment
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import kotlinx.android.synthetic.main.fragment_color_player_playback_controls.* import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.* import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.* import kotlinx.android.synthetic.main.player_time.*
@ -38,7 +41,6 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
} }
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_color_player_playback_controls, container, false) return inflater.inflate(R.layout.fragment_color_player_playback_controls, container, false)
} }
@ -103,7 +105,7 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
title!!.setTextColor(lastPlaybackControlsColor) title!!.setTextColor(lastPlaybackControlsColor)
text!!.setTextColor(lastDisabledPlaybackControlsColor) text!!.setTextColor(lastDisabledPlaybackControlsColor)
TintHelper.setTintAuto(progressSlider!!, lastPlaybackControlsColor, false) setProgressBarColor(lastPlaybackControlsColor, lastDisabledPlaybackControlsColor)
volumeFragment.setTintable(lastPlaybackControlsColor) volumeFragment.setTintable(lastPlaybackControlsColor)
@ -115,6 +117,16 @@ class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {
updatePrevNextColor() updatePrevNextColor()
} }
private fun setProgressBarColor(c1: Int, c2: Int) {
progressSlider.thumbTintList = ColorStateList.valueOf(c1)
val ld = progressSlider.progressDrawable as LayerDrawable
val clipDrawableProgress = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable
clipDrawableProgress.setColorFilter(c1, PorterDuff.Mode.SRC_IN)
val clipDrawableBackground = ld.findDrawableByLayerId(android.R.id.background)
clipDrawableBackground.setColorFilter(c2, PorterDuff.Mode.SRC_IN)
}
private fun setUpPlayPauseFab() { private fun setUpPlayPauseFab() {
TintHelper.setTintAuto(playPauseButton, Color.WHITE, true) TintHelper.setTintAuto(playPauseButton, Color.WHITE, true)

View file

@ -56,7 +56,7 @@ class FlatPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
valueAnimator!!.addUpdateListener { animation -> valueAnimator!!.addUpdateListener { animation ->
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM, val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM,
intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0) intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0)
colorGradientBackground.background = drawable colorGradientBackground!!.background = drawable
} }
valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start() valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start()

View file

@ -1,6 +1,7 @@
package code.name.monkey.retromusic.ui.fragments.player.material package code.name.monkey.retromusic.ui.fragments.player.material
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.content.res.ColorStateList
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
@ -21,6 +22,7 @@ import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.fragment_material_playback_controls.* import kotlinx.android.synthetic.main.fragment_material_playback_controls.*
import kotlinx.android.synthetic.main.fragment_volume.*
import kotlinx.android.synthetic.main.player_time.* import kotlinx.android.synthetic.main.player_time.*
/** /**
@ -105,6 +107,10 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
if (PreferenceUtil.getInstance().adaptiveColor) { if (PreferenceUtil.getInstance().adaptiveColor) {
lastPlaybackControlsColor = color lastPlaybackControlsColor = color
text.setTextColor(color) text.setTextColor(color)
progressSlider.thumbTintList = ColorStateList.valueOf(color)
progressSlider.progressTintList = ColorStateList.valueOf(color)
progressSlider.progressBackgroundTintList = ColorStateList.valueOf(color)
} }
updatePlayPauseColor() updatePlayPauseColor()

View file

@ -1,20 +1,14 @@
package code.name.monkey.retromusic.ui.fragments.player.normal package code.name.monkey.retromusic.ui.fragments.player.normal
import android.animation.Animator
import android.animation.AnimatorSet
import android.animation.ArgbEvaluator import android.animation.ArgbEvaluator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.graphics.drawable.GradientDrawable import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewAnimationUtils
import android.view.ViewGroup import android.view.ViewGroup
import androidx.appcompat.widget.Toolbar import androidx.appcompat.widget.Toolbar
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.model.Song import code.name.monkey.retromusic.model.Song
@ -24,8 +18,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil import code.name.monkey.retromusic.util.ViewUtil
import code.name.monkey.retromusic.views.DrawableGradient import code.name.monkey.retromusic.views.DrawableGradient
import kotlinx.android.synthetic.main.fragment_player.* import kotlinx.android.synthetic.main.fragment_player.*
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks { class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
@ -45,9 +37,8 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), android.R.color.transparent, i) valueAnimator = ValueAnimator.ofObject(ArgbEvaluator(), android.R.color.transparent, i)
valueAnimator!!.addUpdateListener { animation -> valueAnimator!!.addUpdateListener { animation ->
val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM, val drawable = DrawableGradient(GradientDrawable.Orientation.TOP_BOTTOM, intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0)
intArrayOf(animation.animatedValue as Int, android.R.color.transparent), 0) colorGradientBackground!!.background = drawable
colorGradientBackground.background = drawable
} }
valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start() valueAnimator!!.setDuration(ViewUtil.RETRO_MUSIC_ANIM_TIME.toLong()).start()
} }

View file

@ -28,7 +28,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.* import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.* import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.* import kotlinx.android.synthetic.main.player_time.*
import kotlinx.android.synthetic.main.volume_controls.*
class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() { class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
@ -130,8 +129,12 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
private fun setProgressBarColor(newColor: Int) { private fun setProgressBarColor(newColor: Int) {
val ld = progressSlider.progressDrawable as LayerDrawable val ld = progressSlider.progressDrawable as LayerDrawable
val clipDrawable = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN) val clipDrawableProgress = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable
clipDrawableProgress.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
val clipDrawableBackground = ld.findDrawableByLayerId(android.R.id.background)
clipDrawableBackground.setColorFilter(MaterialValueHelper.getPrimaryDisabledTextColor(context!!, ColorUtil.isColorLight(ThemeStore.primaryColor(context!!))), PorterDuff.Mode.SRC_IN)
} }
private fun setUpPlayPauseFab() { private fun setUpPlayPauseFab() {

View file

@ -1,6 +1,7 @@
package code.name.monkey.retromusic.ui.fragments.player.plain package code.name.monkey.retromusic.ui.fragments.player.plain
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.content.res.ColorStateList
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.graphics.drawable.ClipDrawable import android.graphics.drawable.ClipDrawable
import android.graphics.drawable.LayerDrawable import android.graphics.drawable.LayerDrawable
@ -28,7 +29,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.* import kotlinx.android.synthetic.main.fragment_plain_controls_fragment.*
import kotlinx.android.synthetic.main.media_button.* import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.* import kotlinx.android.synthetic.main.player_time.*
import kotlinx.android.synthetic.main.volume_controls.*
/** /**
* @author Hemanth S (h4h13). * @author Hemanth S (h4h13).
@ -130,15 +130,16 @@ class PlainPlaybackControlsFragment : AbsPlayerControlsFragment() {
if (PreferenceUtil.getInstance().adaptiveColor) { if (PreferenceUtil.getInstance().adaptiveColor) {
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(color)), false) TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(color)), false)
TintHelper.setTintAuto(playPauseButton, color, true) TintHelper.setTintAuto(playPauseButton, color, true)
setProgressBarColor(progressSlider, color) setProgressBarColor(color)
} }
updateRepeatState() updateRepeatState()
updateShuffleState() updateShuffleState()
updatePrevNextColor() updatePrevNextColor()
} }
private fun setProgressBarColor(progressBar: SeekBar?, newColor: Int) { private fun setProgressBarColor(newColor: Int) {
val ld = progressBar!!.progressDrawable as LayerDrawable progressSlider.thumbTintList = ColorStateList.valueOf(newColor)
val ld = progressSlider.progressDrawable as LayerDrawable
val clipDrawable = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable val clipDrawable = ld.findDrawableByLayerId(android.R.id.progress) as ClipDrawable
clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN) clipDrawable.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
} }

View file

@ -16,6 +16,10 @@ import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import org.jaudiotagger.audio.AudioFileIO; import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.tag.FieldKey; import org.jaudiotagger.tag.FieldKey;
@ -26,9 +30,6 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import code.name.monkey.retromusic.R; import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.helper.MusicPlayerRemote; import code.name.monkey.retromusic.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.loaders.PlaylistLoader; import code.name.monkey.retromusic.loaders.PlaylistLoader;
@ -60,7 +61,7 @@ public class MusicUtil {
public static Intent createShareSongFileIntent(@NonNull final Song song, Context context) { public static Intent createShareSongFileIntent(@NonNull final Song song, Context context) {
try { try {
return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM, return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM,
FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName(), new File(song.getData()))) FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName(), new File(song.data)))
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) .addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.setType("audio/*"); .setType("audio/*");
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {
@ -135,7 +136,7 @@ public class MusicUtil {
long duration = 0; long duration = 0;
for (int i = 0; i < songs.size(); i++) { for (int i = 0; i < songs.size(); i++) {
duration += songs.get(i).getDuration(); duration += songs.get(i).duration;
} }
return songCount + " " + songString + "" + MusicUtil.getReadableDurationString(duration); return songCount + " " + songString + "" + MusicUtil.getReadableDurationString(duration);
@ -200,7 +201,7 @@ public class MusicUtil {
final StringBuilder selection = new StringBuilder(); final StringBuilder selection = new StringBuilder();
selection.append(BaseColumns._ID + " IN ("); selection.append(BaseColumns._ID + " IN (");
for (int i = 0; i < songs.size(); i++) { for (int i = 0; i < songs.size(); i++) {
selection.append(songs.get(i).getId()); selection.append(songs.get(i).id);
if (i < songs.size() - 1) { if (i < songs.size() - 1) {
selection.append(","); selection.append(",");
} }
@ -264,7 +265,7 @@ public class MusicUtil {
public static String getLyrics(Song song) { public static String getLyrics(Song song) {
String lyrics = null; String lyrics = null;
File file = new File(song.getData()); File file = new File(song.data);
try { try {
lyrics = AudioFileIO.read(file).getTagOrCreateDefault().getFirst(FieldKey.LYRICS); lyrics = AudioFileIO.read(file).getTagOrCreateDefault().getFirst(FieldKey.LYRICS);
@ -279,7 +280,7 @@ public class MusicUtil {
if (dir != null && dir.exists() && dir.isDirectory()) { if (dir != null && dir.exists() && dir.isDirectory()) {
String format = ".*%s.*\\.(lrc|txt)"; String format = ".*%s.*\\.(lrc|txt)";
String filename = Pattern.quote(FileUtil.stripExtension(file.getName())); String filename = Pattern.quote(FileUtil.stripExtension(file.getName()));
String songtitle = Pattern.quote(song.getTitle()); String songtitle = Pattern.quote(song.title);
final ArrayList<Pattern> patterns = new ArrayList<>(); final ArrayList<Pattern> patterns = new ArrayList<>();
patterns.add(Pattern.compile(String.format(format, filename), patterns.add(Pattern.compile(String.format(format, filename),
@ -352,7 +353,7 @@ public class MusicUtil {
//getFavoritesPlaylist(context).blockingFirst().id.subscribe(MusicUtil::setPlaylist); //getFavoritesPlaylist(context).blockingFirst().id.subscribe(MusicUtil::setPlaylist);
//return PlaylistsUtil.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id); //return PlaylistsUtil.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id);
return PlaylistsUtil return PlaylistsUtil
.doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.getId()); .doPlaylistContains(context, getFavoritesPlaylist(context).blockingFirst().id, song.id);
} }
public static boolean isArtistNameUnknown(@Nullable String artistName) { public static boolean isArtistNameUnknown(@Nullable String artistName) {
@ -394,7 +395,7 @@ public class MusicUtil {
public static long getTotalDuration(@NonNull final Context context, @NonNull List<Song> songs) { public static long getTotalDuration(@NonNull final Context context, @NonNull List<Song> songs) {
long duration = 0; long duration = 0;
for (int i = 0; i < songs.size(); i++) { for (int i = 0; i < songs.size(); i++) {
duration += songs.get(i).getDuration(); duration += songs.get(i).duration;
} }
return duration; return duration;
} }

View file

@ -149,7 +149,7 @@ public class PlaylistsUtil {
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
contentValues[i] = new ContentValues(); contentValues[i] = new ContentValues();
contentValues[i].put(MediaStore.Audio.Playlists.Members.PLAY_ORDER, base + offset + i); contentValues[i].put(MediaStore.Audio.Playlists.Members.PLAY_ORDER, base + offset + i);
contentValues[i].put(MediaStore.Audio.Playlists.Members.AUDIO_ID, songs.get(offset + i).getId()); contentValues[i].put(MediaStore.Audio.Playlists.Members.AUDIO_ID, songs.get(offset + i).id);
} }
return contentValues; return contentValues;
} }
@ -158,7 +158,7 @@ public class PlaylistsUtil {
Uri uri = MediaStore.Audio.Playlists.Members.getContentUri( Uri uri = MediaStore.Audio.Playlists.Members.getContentUri(
"external", playlistId); "external", playlistId);
String selection = MediaStore.Audio.Playlists.Members.AUDIO_ID + " =?"; String selection = MediaStore.Audio.Playlists.Members.AUDIO_ID + " =?";
String[] selectionArgs = new String[]{String.valueOf(song.getId())}; String[] selectionArgs = new String[]{String.valueOf(song.id)};
try { try {
context.getContentResolver().delete(uri, selection, selectionArgs); context.getContentResolver().delete(uri, selection, selectionArgs);

View file

@ -85,7 +85,6 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:behavior_overlapTop="52dp" app:behavior_overlapTop="52dp"
@ -99,7 +98,7 @@
app:cardCornerRadius="12dp"> app:cardCornerRadius="12dp">
<LinearLayout <LinearLayout
android:id="@+id/content_container" android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"

View file

@ -106,6 +106,7 @@
app:cardCornerRadius="12dp"> app:cardCornerRadius="12dp">
<LinearLayout <LinearLayout
android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"

View file

@ -53,7 +53,6 @@
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView
android:id="@+id/container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="64dp" android:layout_marginStart="64dp"
@ -63,7 +62,7 @@
app:layout_behavior="@string/appbar_scrolling_view_behavior"> app:layout_behavior="@string/appbar_scrolling_view_behavior">
<LinearLayout <LinearLayout
android:id="@+id/content_container" android:id="@+id/contentContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants" android:descendantFocusability="blocksDescendants"

View file

@ -5,6 +5,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView <androidx.appcompat.widget.AppCompatTextView
android:id="@+id/biographyTitle" android:id="@+id/biographyTitle"
style="@style/SubTitleTextAppearance" style="@style/SubTitleTextAppearance"

View file

@ -11,7 +11,7 @@
android:id="@+id/progressSlider" android:id="@+id/progressSlider"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:maxHeight="3dp" android:maxHeight="2dp"
android:paddingStart="24dp" android:paddingStart="24dp"
android:paddingEnd="24dp" android:paddingEnd="24dp"
android:progressDrawable="@drawable/color_progress_seek" android:progressDrawable="@drawable/color_progress_seek"

View file

@ -18,7 +18,6 @@
android:layout_height="match_parent"> android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@android:color/transparent" android:background="@android:color/transparent"

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -76,4 +76,4 @@
</FrameLayout> </FrameLayout>
</LinearLayout> </LinearLayout>
</code.name.monkey.retromusic.views.FitSystemWindowsLayout> </code.name.monkey.retromusic.views.FitSystemWindowsLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </FrameLayout>

View file

@ -18,12 +18,12 @@
android:id="@+id/action_add_to_playlist" android:id="@+id/action_add_to_playlist"
android:icon="@drawable/ic_playlist_add_white_24dp" android:icon="@drawable/ic_playlist_add_white_24dp"
android:title="@string/action_add_to_playlist" android:title="@string/action_add_to_playlist"
app:showAsAction="always" /> app:showAsAction="ifRoom" />
<item <item
android:id="@+id/action_remove_from_playlist" android:id="@+id/action_remove_from_playlist"
android:icon="@drawable/ic_delete_white_24dp" android:icon="@drawable/ic_delete_white_24dp"
android:title="@string/action_remove_from_playlist" android:title="@string/action_remove_from_playlist"
app:showAsAction="always" /> app:showAsAction="ifRoom" />
</menu> </menu>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -67,7 +67,6 @@
</style> </style>
<style name="SubTitleTextAppearance"> <style name="SubTitleTextAppearance">
<item name="android:textStyle">bold</item>
<item name="android:textSize">18sp</item> <item name="android:textSize">18sp</item>
<item name="android:layout_gravity">start|center_vertical</item> <item name="android:layout_gravity">start|center_vertical</item>
<item name="android:padding">12dp</item> <item name="android:padding">12dp</item>

View file

@ -13,7 +13,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.4.0-alpha08' classpath 'com.android.tools.build:gradle:3.4.0-alpha10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
} }
} }