Merge pull request #188 from h4h13/composer

Composer, Now playing preview, Full screen theme
This commit is contained in:
Hemanth S 2019-02-26 22:22:09 +05:30 committed by GitHub
commit 41c2af0ed6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 718 additions and 373 deletions

View file

@ -32,8 +32,8 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
versionCode 292
versionName '3.1.100'
versionCode 295
versionName '3.1.200'
multiDexEnabled true

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> <h3 style="text-align:center;"> Subscribe to <a href="https://www.youtube.com/user/PewDiePie/">PewDiePie</a> 👊 </h3> <h4>v3.1.100</h4> <ul> <li>Fix Crash in Album tag editor while selecting options</li> </style> </li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li> </ul> <h4>v3.0.570</h4> <ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</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> <h3 style="text-align:center;"> Subscribe to <a href="https://www.youtube.com/user/PewDiePie/">PewDiePie</a> 👊 </h3> <h4>v3.1.230</h4> <ul> <li>Improved full theme appearances</li> </style> Subscribe to <a href="https://www.youtube.com/user/PewDiePie/">PewDiePie</a> 👊 </style> </h3> </style> <h4>v3.1.100</h4> <h4>v3.1.200</h4> <ul> </style> <li>Fix Crash in Album tag editor while selecting options</li> </head> </li> <li>Added Filter song length</li> <li>Added Favourites playlist icon will be accent color</li> <li>Added Colorful settings icons</li> <li>Added Corners for dialog</li> </ul> <h4>v3.0.570</h4> <ul> <li>Fix Album/Artist square image</li> <li>Fix Delete dialog text format</li> <li>Fix Profile picture not showing after coming back from folders</li> <li>Fix Play button color i Simple and Plain themes</li> <li>Fix Sleep timer dialog crashing</li> <li>Fix Share song dialog title and text</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>

View file

@ -81,6 +81,7 @@ object Constants {
val CAST_SERVER_PORT = 8080
const val BASE_SELECTION = MediaStore.Audio.AudioColumns.IS_MUSIC + "=1" + " AND " + MediaStore.Audio.AudioColumns.TITLE + " != ''"
@JvmField
val BASE_PROJECTION = arrayOf(BaseColumns._ID, // 0
MediaStore.Audio.AudioColumns.TITLE, // 1
@ -92,7 +93,8 @@ object Constants {
MediaStore.Audio.AudioColumns.ALBUM_ID, // 7
MediaStore.Audio.AudioColumns.ALBUM, // 8
MediaStore.Audio.AudioColumns.ARTIST_ID, // 9
MediaStore.Audio.AudioColumns.ARTIST)// 10
MediaStore.Audio.AudioColumns.ARTIST,// 10
MediaStore.Audio.AudioColumns.COMPOSER)// 11
const val NUMBER_OF_TOP_TRACKS = 99

View file

@ -0,0 +1,22 @@
package code.name.monkey.retromusic.extensions
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.annotation.LayoutRes
@Suppress("UNCHECKED_CAST")
fun <T : View> ViewGroup.inflate(@LayoutRes layout: Int): T {
return LayoutInflater.from(context).inflate(layout, this, false) as T
}
fun View.show() {
visibility = View.VISIBLE
}
fun View.hide() {
visibility = View.GONE
}
fun View.showOrHide(show: Boolean) = if (show) show() else hide()

View file

@ -1,7 +1,5 @@
package code.name.monkey.retromusic.glide;
import androidx.annotation.NonNull;
import com.bumptech.glide.GenericTransitionOptions;
import com.bumptech.glide.Priority;
import com.bumptech.glide.RequestBuilder;
@ -10,11 +8,11 @@ import com.bumptech.glide.annotation.GlideOption;
import com.bumptech.glide.annotation.GlideType;
import com.bumptech.glide.load.Key;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.request.target.Target;
import com.bumptech.glide.signature.MediaStoreSignature;
import androidx.annotation.NonNull;
import code.name.monkey.retromusic.App;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.glide.artistimage.ArtistImage;

View file

@ -92,6 +92,9 @@ class SortOrder {
/* Song sort order date */
const val SONG_DATE = MediaStore.Audio.Media.DATE_ADDED + " DESC"
/* Song sort order composer*/
const val COMPOSER = MediaStore.Audio.Media.COMPOSER
}
}

View file

@ -56,8 +56,9 @@ object PlaylistSongsLoader {
val artistId = cursor.getInt(9)
val artistName = cursor.getString(10)
val idInPlaylist = cursor.getInt(11)
val composer = cursor.getString(12)
return PlaylistSong(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName, artistId, artistName, playlistId, idInPlaylist)
return PlaylistSong(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName, artistId, artistName, playlistId, idInPlaylist, composer)
}
private fun makePlaylistSongCursor(@NonNull context: Context, playlistId: Int): Cursor? {
@ -75,7 +76,8 @@ object PlaylistSongsLoader {
AudioColumns.ALBUM, // 8
AudioColumns.ARTIST_ID, // 9
AudioColumns.ARTIST, // 10
MediaStore.Audio.Playlists.Members._ID)// 11
MediaStore.Audio.Playlists.Members._ID,//11
AudioColumns.COMPOSER)// 12
, BASE_SELECTION, null,
MediaStore.Audio.Playlists.Members.DEFAULT_SORT_ORDER)
} catch (e: SecurityException) {

View file

@ -57,10 +57,10 @@ object SongLoader {
val albumName = cursor.getString(8)
val artistId = cursor.getInt(9)
val artistName = cursor.getString(10)
val composer = cursor.getString(11)
return Song(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName
?: "",
artistId, artistName)
return Song(id, title, trackNumber, year, duration, data, dateModified, albumId,
albumName ?: "", artistId, artistName, composer ?: "")
}
@JvmOverloads

View file

@ -3,17 +3,30 @@ package code.name.monkey.retromusic.model;
import android.os.Parcel;
public class PlaylistSong extends Song {
public static PlaylistSong EMPTY_PLAYLIST_SONG = new PlaylistSong(-1, "", -1, -1, -1, "", -1, -1, "", -1, "", -1, -1);
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];
}
};
public final int playlistId;
public final int idInPlayList;
public PlaylistSong(int id, String title, int trackNumber, int year, long duration, String data, int dateModified, int albumId, String albumName, int artistId, String artistName, final int playlistId, final int idInPlayList) {
super(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName, artistId, artistName);
public PlaylistSong(int id, String title, int trackNumber, int year, long duration, String data, int dateModified, int albumId, String albumName, int artistId, String artistName, final int playlistId, final int idInPlayList, String composer) {
super(id, title, trackNumber, year, duration, data, dateModified, albumId, albumName, artistId, artistName, composer);
this.playlistId = playlistId;
this.idInPlayList = idInPlayList;
}
protected PlaylistSong(Parcel in) {
super(in);
this.playlistId = in.readInt();
this.idInPlayList = in.readInt();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
@ -44,7 +57,6 @@ public class PlaylistSong extends Song {
'}';
}
@Override
public int describeContents() {
return 0;
@ -56,20 +68,4 @@ public class PlaylistSong extends Song {
dest.writeInt(this.playlistId);
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

@ -7,8 +7,16 @@ 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 static final Song EMPTY_SONG = new Song(-1, "", -1, -1, -1, "", -1, -1, "", -1, "", "");
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];
}
};
public final int id;
public final String title;
public final int trackNumber;
@ -20,8 +28,9 @@ public class Song implements Parcelable {
public final String albumName;
public final int artistId;
public final String artistName;
public final String composer;
public Song(int id, String title, int trackNumber, int year, long duration, String data, long dateModified, int albumId, String albumName, int artistId, 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, String composer) {
this.id = id;
this.title = title;
this.trackNumber = trackNumber;
@ -33,61 +42,22 @@ public class Song implements Parcelable {
this.albumName = albumName;
this.artistId = artistId;
this.artistName = artistName;
this.composer = composer;
}
@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 + '\'' +
'}';
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();
this.composer = in.readString();
}
@ -109,29 +79,6 @@ public class Song implements Parcelable {
dest.writeString(this.albumName);
dest.writeInt(this.artistId);
dest.writeString(this.artistName);
dest.writeString(this.composer);
}
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

@ -41,7 +41,7 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
public static final String DATABASE_NAME = "music_playback_state.db";
public static final String PLAYING_QUEUE_TABLE_NAME = "playing_queue";
public static final String ORIGINAL_PLAYING_QUEUE_TABLE_NAME = "original_playing_queue";
private static final int VERSION = 5;
private static final int VERSION = 7;
@Nullable
private static MusicPlaybackQueueStore sInstance = null;
@ -50,7 +50,7 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
*
* @param context The {@link Context} to use
*/
public MusicPlaybackQueueStore(final Context context) {
public MusicPlaybackQueueStore(final @NonNull Context context) {
super(context, DATABASE_NAME, null, VERSION);
}
@ -110,6 +110,9 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
builder.append(" INT NOT NULL,");
builder.append(AudioColumns.ARTIST);
builder.append(" STRING NOT NULL,");
builder.append(AudioColumns.COMPOSER);
builder.append(" STRING NOT NULL);");
db.execSQL(builder.toString());
@ -173,6 +176,7 @@ public class MusicPlaybackQueueStore extends SQLiteOpenHelper {
values.put(AudioColumns.ALBUM, song.albumName);
values.put(AudioColumns.ARTIST_ID, song.artistId);
values.put(AudioColumns.ARTIST, song.artistName);
values.put(AudioColumns.COMPOSER, song.composer);
database.insert(tableName, null, values);
}

View file

@ -192,7 +192,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
NowPlayingScreen.SIMPLE -> SimplePlayerFragment()
NowPlayingScreen.MATERIAL -> MaterialFragment()
NowPlayingScreen.COLOR -> ColorFragment()
NowPlayingScreen.CLASSIC -> ClassicPlayerFragment()
//NowPlayingScreen.CLASSIC -> ClassicPlayerFragment()
else -> PlayerFragment()
} // must implement AbsPlayerFragment
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit()
@ -260,7 +260,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
super.setLightNavigationBar(true)
super.setLightStatusbar(isColorLight)
} else if (currentNowPlayingScreen == NowPlayingScreen.FULL || currentNowPlayingScreen == NowPlayingScreen.CARD ||
currentNowPlayingScreen == NowPlayingScreen.FIT || currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||
currentNowPlayingScreen == NowPlayingScreen.FIT || /*currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||*/
currentNowPlayingScreen == NowPlayingScreen.BLUR || currentNowPlayingScreen == NowPlayingScreen.BLUR_CARD) {
super.setLightStatusbar(false)
super.setLightNavigationBar(true)

View file

@ -67,6 +67,15 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
}
}
protected val composer: String?
get() {
return try {
getAudioFile(songPaths!![0]).tagOrCreateAndSetDefault.getFirst(FieldKey.COMPOSER)
} catch (ignored: Exception) {
null
}
}
protected val albumTitle: String?
get() {

View file

@ -51,6 +51,7 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
yearText.addTextChangedListener(this)
trackNumberText.addTextChangedListener(this)
lyricsText.addTextChangedListener(this)
songComposerText.addTextChangedListener(this)
}
private fun fillViewsWithFileTags() {
@ -62,6 +63,7 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
yearText.setText(songYear)
trackNumberText.setText(trackNumber)
lyricsText.setText(lyrics)
songComposerText.setText(composer)
}
override fun loadCurrentImage() {
@ -90,6 +92,7 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
fieldKeyValueMap[FieldKey.TRACK] = trackNumberText.text.toString()
fieldKeyValueMap[FieldKey.LYRICS] = lyricsText.text.toString()
fieldKeyValueMap[FieldKey.ALBUM_ARTIST] = albumArtistText.text.toString()
fieldKeyValueMap[FieldKey.COMPOSER] = songComposerText.text.toString()
writeValuesToFiles(fieldKeyValueMap, null)
}

View file

@ -2,6 +2,7 @@ package code.name.monkey.retromusic.ui.adapter.base;
import android.content.Context;
import androidx.annotation.MenuRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;
import android.view.Menu;
@ -23,7 +24,7 @@ public abstract class AbsMultiSelectAdapter<VH extends RecyclerView.ViewHolder,
private ArrayList<I> checked;
private int menuRes;
public AbsMultiSelectAdapter(Context context, @Nullable CabHolder cabHolder, @MenuRes int menuRes) {
public AbsMultiSelectAdapter(@NonNull Context context, @Nullable CabHolder cabHolder, @MenuRes int menuRes) {
this.cabHolder = cabHolder;
checked = new ArrayList<>();
this.menuRes = menuRes;

View file

@ -14,13 +14,13 @@ enum class NowPlayingScreen constructor(@param:StringRes @field:StringRes
BLUR_CARD(R.string.blur_card, R.drawable.np_blur_card, 9),
CARD(R.string.card, R.drawable.np_card, 6),
COLOR(R.string.color, R.drawable.np_color, 5),
FIT(R.string.fit, R.drawable.np_adaptive, 12),
FIT(R.string.fit, R.drawable.np_fit, 12),
FLAT(R.string.flat, R.drawable.np_flat, 1),
FULL(R.string.full, R.drawable.np_full, 2),
MATERIAL(R.string.material, R.drawable.np_material, 11),
NORMAL(R.string.normal, R.drawable.np_normal, 0),
PLAIN(R.string.plain, R.drawable.np_plain, 3),
CLASSIC(R.string.classic, R.drawable.np_normal, 7),
//CLASSIC(R.string.classic, R.drawable.np_normal, 7),
SIMPLE(R.string.simple, R.drawable.np_simple, 8)
}

View file

@ -107,9 +107,8 @@ class VolumeFragment : Fragment(), SeekBar.OnSeekBarChangeListener, OnAudioVolum
}
fun setTintable(color: Int) {
TintHelper.setTintAuto(volumeSeekBar, color, false)
TintHelper.setTintAuto(volumeSeekBar, color, true)
}
fun removeThumb() {

View file

@ -194,7 +194,7 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItem
else
code.name.monkey.retromusic.R.drawable.ic_favorite_border_white_24dp
val drawable = RetroUtil.getTintedVectorDrawable(activity, res, toolbarIconColor())
toolbarGet().menu.findItem(R.id.action_toggle_favorite).setIcon(drawable).title = if (isFavorite) getString(R.string.action_remove_from_favorites) else getString(R.string.action_add_to_favorites)
toolbarGet().menu.findItem(R.id.action_toggle_favorite)?.setIcon(drawable)?.title = if (isFavorite) getString(R.string.action_remove_from_favorites) else getString(R.string.action_add_to_favorites)
}
}
}.execute(MusicPlayerRemote.currentSong)

View file

@ -44,7 +44,6 @@ import code.name.monkey.retromusic.loaders.SongLoader;
import code.name.monkey.retromusic.ui.activities.SettingsActivity;
import code.name.monkey.retromusic.ui.fragments.base.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
import code.name.monkey.retromusic.ui.fragments.mainactivity.home.BannerHomeFragment;
import code.name.monkey.retromusic.util.Compressor;
import code.name.monkey.retromusic.util.NavigationUtil;
import code.name.monkey.retromusic.util.PreferenceUtil;
@ -71,12 +70,6 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
private ImageView userImage;
private CompositeDisposable disposable;
@Override
public void onDestroyView() {
super.onDestroyView();
disposable.dispose();
}
public static Fragment newInstance(int tab) {
Bundle args = new Bundle();
args.putInt(CURRENT_TAB_ID, tab);
@ -89,6 +82,12 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
return new LibraryFragment();
}
@Override
public void onDestroyView() {
super.onDestroyView();
disposable.dispose();
}
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
@ -295,9 +294,10 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_ALBUM));
sortOrderMenu.add(0, R.id.action_song_sort_order_year, 4, R.string.sort_order_year)
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_YEAR));
sortOrderMenu.add(0, R.id.action_song_sort_order_date, 4, R.string.sort_order_date)
sortOrderMenu.add(0, R.id.action_song_sort_order_date, 5, R.string.sort_order_date)
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.SONG_DATE));
sortOrderMenu.add(0, R.id.action_song_sort_order_composer, 6, R.string.sort_order_composer)
.setChecked(currentSortOrder.equals(SortOrder.SongSortOrder.COMPOSER));
}
sortOrderMenu.setGroupCheckable(0, true, true);
@ -351,6 +351,9 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
case R.id.action_song_sort_order_date:
sortOrder = SortOrder.SongSortOrder.SONG_DATE;
break;
case R.id.action_song_sort_order_composer:
sortOrder = SortOrder.SongSortOrder.COMPOSER;
break;
}
}

View file

@ -173,7 +173,6 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
private fun setupToolbar() {
toolbar.navigationIcon = TintHelper.createTintedDrawable(ContextCompat.getDrawable(context!!, R.drawable.ic_search_white_24dp), ThemeStore.textColorSecondary(context!!))
mainActivity.title = null
mainActivity.setSupportActionBar(toolbar)
toolbar.setBackgroundColor(Color.TRANSPARENT)
}

View file

@ -27,7 +27,6 @@ import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.*
class BlurPlaybackControlsFragment : AbsPlayerControlsFragment() {

View file

@ -25,7 +25,6 @@ import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
import code.name.monkey.retromusic.util.MusicUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.*
class ColorPlaybackControlsFragment : AbsPlayerControlsFragment() {

View file

@ -27,7 +27,6 @@ import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.*
class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {

View file

@ -27,7 +27,6 @@ import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_flat_player_playback_controls.*
import kotlinx.android.synthetic.main.player_time.*
class FlatPlaybackControlsFragment : AbsPlayerControlsFragment(), Callback {

View file

@ -1,22 +1,32 @@
package code.name.monkey.retromusic.ui.fragments.player.full
import android.animation.ObjectAnimator
import android.annotation.SuppressLint
import android.app.AlertDialog
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.PorterDuff
import android.os.AsyncTask
import android.os.Bundle
import android.view.LayoutInflater
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
import android.view.animation.DecelerateInterpolator
import android.view.animation.LinearInterpolator
import android.widget.PopupMenu
import android.widget.SeekBar
import androidx.core.content.ContextCompat
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.ui.fragments.VolumeFragment
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerControlsFragment
@ -24,13 +34,12 @@ import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_full_player_controls.*
import kotlinx.android.synthetic.main.player_time.*
/**
* Created by hemanths on 20/09/17.
*/
class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
class FullPlaybackControlsFragment : AbsPlayerControlsFragment(), PopupMenu.OnMenuItemClickListener {
private var lastPlaybackControlsColor: Int = 0
private var lastDisabledPlaybackControlsColor: Int = 0
@ -107,7 +116,11 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
} else {
ThemeStore.accentColor(context!!)
}
setProgressBarColor(colorFinal)
text.setTextColor(colorFinal)
ViewUtil.setProgressDrawable(progressSlider, colorFinal, true)
playPauseButton.backgroundTintList = ColorStateList.valueOf(colorFinal)
playPauseButton.imageTintList = ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(colorFinal)))
updateRepeatState()
updateShuffleState()
@ -115,10 +128,6 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
}
private fun setProgressBarColor(dark: Int) {
ViewUtil.setProgressDrawable(progressSlider, dark)
}
override fun onServiceConnected() {
updatePlayPauseDrawableState()
updateRepeatState()
@ -130,6 +139,7 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
val song = MusicPlayerRemote.currentSong
title.text = song.title
text.text = song.artistName
updateIsFavorite()
}
override fun onPlayingMetaChanged() {
@ -166,6 +176,21 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
setUpRepeatButton()
setUpShuffleButton()
setUpProgressSlider()
setupFavourite()
setupMenu()
}
private fun setupMenu() {
playerMenu.setOnClickListener {
val popupMenu = PopupMenu(context!!, it)
popupMenu.setOnMenuItemClickListener(this)
popupMenu.inflate(R.menu.menu_player)
popupMenu.show()
}
}
override fun onMenuItemClick(item: MenuItem?): Boolean {
return (parentFragment as FullPlayerFragment).onMenuItemClick(item!!)
}
private fun setUpPrevNext() {
@ -231,4 +256,55 @@ class FullPlaybackControlsFragment : AbsPlayerControlsFragment() {
}
}
}
private fun setupFavourite() {
songFavourite?.setOnClickListener {
toggleFavorite(MusicPlayerRemote.currentSong)
}
}
private fun toggleFavorite(song: Song) {
MusicUtil.toggleFavorite(activity!!, song)
if (song.id == MusicPlayerRemote.currentSong.id) {
updateIsFavorite()
}
}
private var updateIsFavoriteTask: AsyncTask<*, *, *>? = null
@SuppressLint("StaticFieldLeak")
fun updateIsFavorite() {
if (updateIsFavoriteTask != null) {
updateIsFavoriteTask!!.cancel(false)
}
updateIsFavoriteTask = object : AsyncTask<Song, Void, Boolean>() {
override fun doInBackground(vararg params: Song): Boolean? {
val activity = activity
return if (activity != null) {
MusicUtil.isFavorite(getActivity()!!, params[0])
} else {
cancel(false)
null
}
}
override fun onPostExecute(isFavorite: Boolean?) {
val activity = activity
if (activity != null) {
val res = if (isFavorite!!)
R.drawable.ic_favorite_white_24dp
else
R.drawable.ic_favorite_border_white_24dp
val drawable = TintHelper.createTintedDrawable(activity, res, Color.WHITE)
songFavourite?.setImageDrawable(drawable)
}
}
}.execute(MusicPlayerRemote.currentSong)
}
fun onFavoriteToggled() {
toggleFavorite(MusicPlayerRemote.currentSong)
}
}

View file

@ -8,10 +8,20 @@ import android.view.ViewGroup
import androidx.appcompat.widget.Toolbar
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.hide
import code.name.monkey.retromusic.extensions.show
import code.name.monkey.retromusic.glide.GlideApp
import code.name.monkey.retromusic.glide.RetroGlideExtension
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.loaders.ArtistLoader
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment
import code.name.monkey.retromusic.util.NavigationUtil
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.disposables.CompositeDisposable
import io.reactivex.schedulers.Schedulers
import kotlinx.android.synthetic.main.fragment_full.*
class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
@ -26,10 +36,8 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
private fun setUpPlayerToolbar() {
playerToolbar.apply {
inflateMenu(R.menu.menu_player)
setNavigationIcon(R.drawable.ic_close_white_24dp)
setNavigationOnClickListener { activity!!.onBackPressed() }
setOnMenuItemClickListener(this@FullPlayerFragment)
}
}
@ -42,6 +50,13 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
super.onViewCreated(view, savedInstanceState)
setUpSubFragments()
setUpPlayerToolbar()
setupArtist()
}
private fun setupArtist() {
artistImage.setOnClickListener {
NavigationUtil.goToArtist(activity!!, MusicPlayerRemote.currentSong.artistId)
}
}
private fun setUpSubFragments() {
@ -77,6 +92,7 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
override fun onFavoriteToggled() {
toggleFavorite(MusicPlayerRemote.currentSong)
fullPlaybackControlsFragment.onFavoriteToggled()
}
override fun toggleFavorite(song: Song) {
@ -85,4 +101,64 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
updateIsFavorite()
}
}
override fun onServiceConnected() {
super.onServiceConnected()
updateArtistImage()
updateLabel()
}
override fun onPlayingMetaChanged() {
super.onPlayingMetaChanged()
updateArtistImage()
updateLabel()
}
override fun onDestroyView() {
super.onDestroyView()
compositeDisposable.dispose()
}
private val compositeDisposable = CompositeDisposable()
private fun updateArtistImage() {
compositeDisposable.addAll(ArtistLoader.getArtist(context!!, MusicPlayerRemote.currentSong.artistId)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe {
GlideApp.with(activity!!)
.asBitmapPalette()
.load(RetroGlideExtension.getArtistModel(it))
.transition(RetroGlideExtension.getDefaultTransition())
.artistOptions(it)
.dontAnimate()
.into(object : RetroMusicColoredTarget(artistImage) {
override fun onColorReady(color: Int) {
}
})
})
}
override fun onQueueChanged() {
super.onQueueChanged()
if (MusicPlayerRemote.playingQueue.isNotEmpty()) updateLabel()
}
private fun updateLabel() {
(MusicPlayerRemote.playingQueue.size - 1).apply {
println("Log Position $this ${MusicPlayerRemote.position}")
if (this == (MusicPlayerRemote.position)) {
nextSongLabel.setText(R.string.last_song)
nextSong.hide()
} else {
val title = MusicPlayerRemote.playingQueue[MusicPlayerRemote.position + 1].title
nextSongLabel.setText(R.string.next_song)
nextSong.apply {
text = title
show()
}
}
}
}
}

View file

@ -24,7 +24,6 @@ import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_material_playback_controls.*
import kotlinx.android.synthetic.main.player_time.*
/**
* @author Hemanth S (h4h13).
@ -114,6 +113,7 @@ class MaterialControlsFragment : AbsPlayerControlsFragment() {
}
text.setTextColor(colorFinal)
ViewUtil.setProgressDrawable(progressSlider, ColorUtil.stripAlpha(colorFinal), true)
volumeFragment.setTintable(colorFinal)
updatePlayPauseColor()

View file

@ -76,7 +76,6 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
}
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
val display = activity?.windowManager?.defaultDisplay
val outMetrics = DisplayMetrics()
display?.getMetrics(outMetrics)
@ -85,9 +84,11 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
val dpHeight = outMetrics.heightPixels / density
val dpWidth = outMetrics.widthPixels / density
playerAlbumCoverContainer?.layoutParams?.width = RetroUtil.convertDpToPixel(dpWidth - 20, context!!).toInt()
playerAlbumCoverContainer?.layoutParams?.height = RetroUtil.convertDpToPixel((dpWidth - getCutOff()), context!!).toInt()
}
private fun getCutOff(): Int {
return if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.LOLLIPOP_MR1) 20 else 0
}
override fun toggleFavorite(song: Song) {

View file

@ -27,7 +27,6 @@ import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
import kotlinx.android.synthetic.main.media_button.*
import kotlinx.android.synthetic.main.player_time.*
class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
@ -79,11 +78,14 @@ class PlayerPlaybackControlsFragment : AbsPlayerControlsFragment() {
ThemeStore.accentColor(context!!)
}
volumeFragment.setTintable(colorFinal)
TintHelper.setTintAuto(playPauseButton, MaterialValueHelper.getPrimaryTextColor(context!!, ColorUtil.isColorLight(colorFinal)), false)
TintHelper.setTintAuto(playPauseButton, colorFinal, true)
ViewUtil.setProgressDrawable(progressSlider, colorFinal)
volumeFragment.setTintable(colorFinal)
updateRepeatState()
updateShuffleState()
updatePrevNextColor()

View file

@ -12,7 +12,6 @@ import androidx.annotation.Nullable;
import androidx.core.app.ActivityCompat;
import androidx.core.app.ActivityOptionsCompat;
import androidx.core.util.Pair;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.model.Genre;
@ -57,6 +56,14 @@ public class NavigationUtil {
ActivityOptionsCompat.makeSceneTransitionAnimation(activity, sharedElements).toBundle());
}
public static void goToArtist(@NonNull Activity activity, int i) {
Intent intent = new Intent(activity, ArtistDetailActivity.class);
intent.putExtra(ArtistDetailActivity.EXTRA_ARTIST_ID, i);
//noinspection unchecked
ActivityCompat.startActivity(activity, intent,
ActivityOptionsCompat.makeSceneTransitionAnimation(activity, null).toBundle());
}
public static void goToPlaylistNew(@NonNull Activity activity, Playlist playlist) {
Intent intent = new Intent(activity, PlaylistDetailActivity.class);
intent.putExtra(PlaylistDetailActivity.Companion.getEXTRA_PLAYLIST(), playlist);

View file

@ -40,7 +40,7 @@ class ColorIconsImageView : AppCompatImageView {
0.12f
}
val filterColor = if (ATHUtil.isWindowBackgroundDark(context)) {
ThemeStore.textColorPrimary(context)
ThemeStore.primaryColor(context)
} else {
color
}

View file

@ -56,7 +56,7 @@ public class RoundedBottomSheetDialogFragment extends AppCompatDialogFragment {
@NonNull
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
public Dialog onCreateDialog(@NonNull Bundle savedInstanceState) {
//noinspection ConstantConditions
return new CustomWidthBottomSheetDialog(getContext(), getTheme());
}

View file

@ -6,23 +6,26 @@ import android.util.AttributeSet;
import android.view.WindowInsets;
import android.widget.FrameLayout;
import androidx.annotation.NonNull;
public class StatusBarMarginFrameLayout extends FrameLayout {
public StatusBarMarginFrameLayout(Context context) {
public StatusBarMarginFrameLayout(@NonNull Context context) {
super(context);
}
public StatusBarMarginFrameLayout(Context context, AttributeSet attrs) {
public StatusBarMarginFrameLayout(@NonNull Context context, @NonNull AttributeSet attrs) {
super(context, attrs);
}
public StatusBarMarginFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
public StatusBarMarginFrameLayout(@NonNull Context context, @NonNull AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@NonNull
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
public WindowInsets onApplyWindowInsets(@NonNull WindowInsets insets) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams();
lp.topMargin = insets.getSystemWindowInsetTop();

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View file

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:focusable="true">
<View
android:id="@+id/colorGradientBackground"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.jetradarmobile.snowfall.SnowfallView
android:id="@+id/snowfall"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="@layout/shadow_statusbar_toolbar" />
<code.name.monkey.retromusic.views.FitSystemWindowsLayout
android:id="@+id/safeArea"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
android:id="@+id/playerAlbumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<fragment
android:id="@+id/playerAlbumCoverFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_album_cover" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<fragment
android:id="@+id/playbackControlsFragment"
android:name="code.name.monkey.retromusic.ui.fragments.player.normal.PlayerPlaybackControlsFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_player_playback_controls" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">
<androidx.appcompat.widget.Toolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:layout_gravity="bottom"
android:navigationIcon="@drawable/ic_close_white_24dp"
app:navigationIcon="@drawable/ic_close_white_24dp" />
</FrameLayout>
</LinearLayout>
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
</FrameLayout>

View file

@ -22,7 +22,7 @@
android:id="@+id/sectionTitle"
style="@style/SubTitleTextAppearance"
android:text="@string/for_you"
android:textStyle="bold" />
/>
</LinearLayout>

View file

@ -143,6 +143,23 @@
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/songComposerText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_vertical"
android:hint="@string/composer"
android:inputType="text|textCapWords"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Title" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"

View file

@ -26,11 +26,6 @@
android:text="@string/whats_new" />
</androidx.appcompat.widget.Toolbar>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?dividerColor" />
</com.google.android.material.appbar.AppBarLayout>
<WebView

View file

@ -10,50 +10,56 @@
android:orientation="vertical"
tools:ignore="MissingPrefix">
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxHeight="3dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:progressDrawable="@drawable/color_progress_seek"
tools:progress="20" />
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp">
android:layout_height="@dimen/progress_container_height"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:textColor="?android:attr/textColorSecondary"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:textColor="?android:attr/textColorSecondary"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
android:textStyle="bold"
tools:text="22.00" />
</LinearLayout>
tools:ignore="RtlHardcoded,RtlSymmetry" />
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/playerMediaControllerContainer"

View file

@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="8dp"
app:cardElevation="16dp"
app:cardElevation="8dp"
app:cardUseCompatPadding="true">
<androidx.appcompat.widget.AppCompatImageView

View file

@ -89,7 +89,6 @@
android:id="@+id/playerPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/status_bar_padding"
android:orientation="vertical">
<com.google.android.material.card.MaterialCardView

View file

@ -8,17 +8,55 @@
android:orientation="vertical"
tools:ignore="MissingPrefix">
<androidx.appcompat.widget.AppCompatSeekBar
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/progress_container_height"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
android:thumb="@drawable/slider_thumb"
tools:ignore="RtlHardcoded,UnusedAttribute" />
<include layout="@layout/player_time" />
android:thumb="@drawable/switch_square"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
@ -16,7 +17,7 @@
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#50000000" />
android:background="#90000000" />
<code.name.monkey.retromusic.views.FitSystemWindowsLayout
android:id="@+id/safeArea"
@ -37,17 +38,80 @@
android:layout_gravity="bottom"
tools:layout="@layout/fragment_full_player_controls" />
<FrameLayout
</LinearLayout>
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
<LinearLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/status_bar" />
</FrameLayout>
<androidx.appcompat.widget.Toolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:navigationIcon="@drawable/ic_close_white_24dp" />
android:navigationIcon="@drawable/ic_close_white_24dp">
</FrameLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/nextSongLabel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:alpha="0.75"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/next_song"
android:textColor="@color/md_white_1000"
app:layout_constraintEnd_toStartOf="@+id/artistImage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/nextSong"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColor="@color/md_white_1000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/artistImage"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/nextSongLabel"
tools:text="@string/for_you" />
<code.name.monkey.retromusic.views.CircularImageView
android:id="@+id/artistImage"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_gravity="end"
android:layout_marginEnd="8dp"
android:elevation="10dp"
app:civ_border="false"
app:civ_shadow="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/default_artist_art" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.Toolbar>
</LinearLayout>
</code.name.monkey.retromusic.views.FitSystemWindowsLayout>
</FrameLayout>

View file

@ -5,50 +5,127 @@
android:id="@+id/player_footer_frame"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
tools:background="@color/md_grey_800">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/playerMenu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_more_vert_white_24dp" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
style="@style/TextAppearance.MaterialComponents.Subtitle1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="8dp"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Title"
android:textColor="@color/md_white_1000" />
android:textColor="@color/md_white_1000"
app:layout_constraintEnd_toStartOf="@+id/songFavourite"
app:layout_constraintStart_toEndOf="@+id/playerMenu"
app:layout_constraintTop_toTopOf="parent"
tools:text="@string/for_you" />
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:alpha="0.75"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingBottom="16dp"
android:textAppearance="@style/TextAppearance.Widget.AppCompat.Toolbar.Subtitle"
android:textColor="@color/md_white_1000" />
android:textColor="@color/md_white_1000"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/songFavourite"
app:layout_constraintStart_toEndOf="@+id/playerMenu"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="@string/for_you" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/songFavourite"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0"
app:srcCompat="@drawable/ic_favorite_border_white_24dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<TextView
android:id="@+id/songCurrentProgress"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:00" />
<TextView
android:id="@+id/songTotalTime"
style="@style/TextAppearance.MaterialComponents.Body1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry"
tools:text="00:00" />
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:paddingStart="22dp"
android:paddingEnd="22dp"
android:paddingBottom="4dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
android:thumb="@drawable/switch_thumb_material"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
<include layout="@layout/player_time" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layoutDirection="ltr"
android:minHeight="96dp"
tools:ignore="ContentDescription,UnusedAttribute">
<ImageButton
@ -105,15 +182,22 @@
app:srcCompat="@drawable/ic_shuffle_white_24dp"
tools:ignore="MissingPrefix" />
<ImageButton
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/playPauseButton"
android:layout_width="72dp"
android:layout_height="72dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@drawable/line_button"
android:foreground="?attr/roundSelector"
android:padding="20dp"
android:scaleType="fitCenter"
app:backgroundTint="@color/md_grey_200"
app:borderWidth="0dp"
app:elevation="0dp"
app:fabCustomSize="68dp"
app:fabSize="auto"
app:maxImageSize="32dp"
app:pressedTranslationZ="12dp"
tools:ignore="MissingPrefix"
tools:src="@drawable/ic_pause_white_24dp" />

View file

@ -9,17 +9,54 @@
android:orientation="vertical"
tools:ignore="MissingPrefix">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:paddingStart="12dp"
android:paddingEnd="12dp">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:progressDrawable="@drawable/color_progress_seek"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:splitTrack="false"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
<include layout="@layout/player_time" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"

View file

@ -36,9 +36,11 @@
<include layout="@layout/status_bar" />
</FrameLayout>
<code.name.monkey.retromusic.views.WidthFitSquareLayout
<FrameLayout
android:id="@+id/playerAlbumCoverContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_weight="0">
<fragment
android:id="@+id/playerAlbumCoverFragment"
@ -46,11 +48,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout="@layout/fragment_album_cover" />
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1">
<fragment
@ -62,7 +64,6 @@
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0">

View file

@ -8,19 +8,53 @@
android:orientation="vertical"
tools:ignore="MissingPrefix">
<RelativeLayout
android:paddingEnd="12dp"
android:paddingStart="12dp"
android:layout_width="match_parent"
android:layout_height="28dp">
<TextView
android:id="@+id/songCurrentProgress"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|left|end"
android:paddingLeft="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<TextView
android:id="@+id/songTotalTime"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:fontFamily="sans-serif-medium"
android:gravity="center_vertical|right|end"
android:paddingRight="8dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textColor="?android:textColorSecondary"
android:textSize="12sp"
tools:ignore="RtlHardcoded,RtlSymmetry" />
<SeekBar
android:id="@+id/progressSlider"
android:layout_width="match_parent"
style="@style/MusicProgressSlider"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/songTotalTime"
android:layout_toRightOf="@id/songCurrentProgress"
android:maxHeight="3dp"
android:paddingStart="24dp"
android:paddingEnd="24dp"
android:progressDrawable="@drawable/color_progress_seek"
android:splitTrack="false"
android:thumb="@drawable/switch_thumb_material"
tools:ignore="RtlHardcoded,UnusedAttribute"
tools:progress="20" />
<include layout="@layout/player_time" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"

View file

@ -13,7 +13,7 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="16dp"
android:padding="12dp"
app:srcCompat="@drawable/ic_volume_down_white_24dp" />
<androidx.appcompat.widget.AppCompatSeekBar
@ -30,6 +30,6 @@
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="16dp"
android:padding="12dp"
app:srcCompat="@drawable/ic_volume_up_white_24dp" />
</LinearLayout>

View file

@ -20,8 +20,7 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/sectionTitle"
style="@style/SubTitleTextAppearance"
android:textStyle="bold" />
style="@style/SubTitleTextAppearance" />
</LinearLayout>

View file

@ -20,8 +20,7 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/sectionTitle"
style="@style/SubTitleTextAppearance"
android:textStyle="bold" />
style="@style/SubTitleTextAppearance" />
</LinearLayout>

View file

@ -22,8 +22,7 @@
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
android:id="@+id/sectionTitle"
style="@style/SubTitleTextAppearance"
android:textStyle="bold" />
style="@style/SubTitleTextAppearance" />
</LinearLayout>

View file

@ -16,6 +16,7 @@
<item name="action_song_sort_order_album" type="id" />
<item name="action_song_sort_order_year" type="id" />
<item name="action_song_sort_order_date" type="id" />
<item name="action_song_sort_order_composer" type="id" />
<item name="action_multi_select_adapter_check_all" type="id" />
</resources>

View file

@ -598,5 +598,9 @@
<string name="md_error_label">Error</string>
<string name="md_storage_perm_error">Permission error</string>
<string name="classic">Classic</string>
<string name="sort_order_composer">Composer</string>
<string name="composer">Composer</string>
<string name="next_song">Next Song</string>
<string name="last_song">Last song</string>
</resources>

View file

@ -1,4 +1,4 @@
#Fri Jan 18 19:55:16 IST 2019
#Sun Feb 24 22:42:48 IST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME