updated
This commit is contained in:
parent
a3a4618769
commit
7a42723b9e
103 changed files with 1879 additions and 1195 deletions
|
@ -32,7 +32,7 @@ android {
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|
||||||
applicationId "code.name.monkey.retromusic"
|
applicationId "code.name.monkey.retromusic"
|
||||||
versionCode 305
|
versionCode 308
|
||||||
versionName '3.1.300'
|
versionName '3.1.300'
|
||||||
|
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
@ -86,8 +86,8 @@ android {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility '1.8'
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility '1.8'
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations.all {
|
configurations.all {
|
||||||
|
@ -120,17 +120,17 @@ static def getDate() {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.multidex:multidex:2.0.1'
|
implementation 'androidx.multidex:multidex:2.0.1'
|
||||||
implementation "androidx.fragment:fragment:$supportLibVersion"
|
implementation 'androidx.fragment:fragment:1.1.0-alpha05'
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
|
||||||
implementation "androidx.recyclerview:recyclerview:$supportLibVersion"
|
implementation "androidx.recyclerview:recyclerview:1.1.0-alpha03"
|
||||||
implementation "androidx.gridlayout:gridlayout:$supportLibVersion"
|
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
||||||
implementation "androidx.cardview:cardview:$supportLibVersion"
|
implementation "androidx.cardview:cardview:1.0.0"
|
||||||
implementation "androidx.palette:palette:$supportLibVersion"
|
implementation "androidx.palette:palette:1.0.0"
|
||||||
implementation "androidx.annotation:annotation:$supportLibVersion"
|
implementation 'androidx.annotation:annotation:1.1.0-alpha02'
|
||||||
implementation "androidx.preference:preference:$supportLibVersion"
|
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
||||||
implementation "androidx.legacy:legacy-support-v13:$supportLibVersion"
|
implementation "androidx.legacy:legacy-support-v13:1.0.0"
|
||||||
implementation "androidx.legacy:legacy-preference-v14:$supportLibVersion"
|
implementation "androidx.legacy:legacy-preference-v14:1.0.0"
|
||||||
implementation "com.google.android.material:material:$supportLibVersion"
|
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
||||||
implementation 'androidx.palette:palette-ktx:1.0.0'
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
||||||
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
|
||||||
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
|
||||||
|
@ -141,6 +141,7 @@ dependencies {
|
||||||
implementation 'com.afollestad.material-dialogs:color:2.0.0'
|
implementation 'com.afollestad.material-dialogs:color:2.0.0'
|
||||||
implementation 'com.afollestad:material-cab:0.1.12'
|
implementation 'com.afollestad:material-cab:0.1.12'
|
||||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||||
|
kapt 'com.github.bumptech.glide:compiler:4.8.0'
|
||||||
implementation 'com.github.bumptech.glide:okhttp3-integration:4.8.0'
|
implementation 'com.github.bumptech.glide:okhttp3-integration:4.8.0'
|
||||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
|
||||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.7'
|
implementation 'io.reactivex.rxjava2:rxjava:2.2.7'
|
||||||
|
@ -151,18 +152,17 @@ dependencies {
|
||||||
implementation 'com.github.kabouzeid:RecyclerView-FastScroll:1.0.16-kmod'
|
implementation 'com.github.kabouzeid:RecyclerView-FastScroll:1.0.16-kmod'
|
||||||
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
|
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
|
||||||
/*UI Library*/
|
/*UI Library*/
|
||||||
implementation 'me.zhanghai.android.materialprogressbar:library:1.4.2'
|
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
|
||||||
implementation 'com.r0adkll:slidableactivity:2.0.6'
|
implementation 'com.r0adkll:slidableactivity:2.0.6'
|
||||||
/*Backend all*/
|
/*Backend all*/
|
||||||
implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.0-kmod3'
|
implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.0-kmod3'
|
||||||
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
|
implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3'
|
||||||
implementation 'org.nanohttpd:nanohttpd:2.3.1'
|
implementation 'org.nanohttpd:nanohttpd:2.3.1'
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.5'
|
implementation 'org.eclipse.mylyn.github:org.eclipse.egit.github.core:3.4.0.201406110918-r'
|
||||||
implementation 'com.github.jetradarmobile:android-snowfall:1.2.0'
|
implementation 'com.github.jetradarmobile:android-snowfall:1.2.0'
|
||||||
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'
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
|
||||||
implementation project(':appthemehelper')
|
implementation project(':appthemehelper')
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|
|
@ -165,8 +165,8 @@
|
||||||
android:value="code.name.monkey.retromusic.cast.CastOptionsProvider" />
|
android:value="code.name.monkey.retromusic.cast.CastOptionsProvider" />
|
||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name=".misc.GenericFileProvider"
|
||||||
android:authorities="${applicationId}"
|
android:authorities="${applicationId}.provider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|
|
@ -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.1.300</h4>
<ul>
<li>Added new slide theme</li>
<li>Fix Home screen sections loading slow</li>
</ul>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
Added new slide theme</li>
<li>Fix Home screen sections loading slow</li>
</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</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>
<h4>v3.1.300</h4>
<ul>
<li>Added new slide theme</li>
</ul>
<li>Removed library options which are duplicated (it's available from profile menu)</li>
<li>Replaced collapsing Fab with Android Floating Extended Fab</li>
<li>Replaced home with for you</li>
<li>Fixed profile image not loading in about</li>
<li>Improved selecting user profile image</li>
<li>Added bio to enter custom message</li>
<li>Fix Home screen sections loading slow</li>
</ul>
<h4>v3.1.240</h4>
<ul>
<li>Fix Search not showing from home screen</li>
<li>Fix Volume controls color issue</li>
<li>Fix Seek bar alignment</li>
<li>Added tiny theme</li>
<li>Improved full theme appearances</li>
<li>Now playing theme preview updated</li>
<li>Fix Home screen sections loading slow</li>
Added new slide theme</li>
<li>Fix Home screen sections loading slow</li>
<li>Fix Home screen sections loading slow</li>
</li>
</ul>
<h4>v3.1.200</h4>
<ul>
<li>Added composer sort and editing</li>
<li>Fix Crash in Album tag editor while selecting options</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>
|
|
@ -50,7 +50,7 @@ class AddToPlaylistDialog : RoundedBottomSheetDialogFragment() {
|
||||||
|
|
||||||
bannerTitle.setTextColor(ThemeStore.textColorPrimary(context!!))
|
bannerTitle.setTextColor(ThemeStore.textColorPrimary(context!!))
|
||||||
val playlists = PlaylistLoader.getAllPlaylists(activity!!).blockingFirst()
|
val playlists = PlaylistLoader.getAllPlaylists(activity!!).blockingFirst()
|
||||||
val playlistAdapter = AddToPlaylist(activity!!, playlists, R.layout.item_playlist, songs!!, dialog)
|
val playlistAdapter = AddToPlaylist(activity!!, playlists, R.layout.item_playlist, songs!!, dialog!!)
|
||||||
recyclerView.apply {
|
recyclerView.apply {
|
||||||
layoutManager = LinearLayoutManager(context)
|
layoutManager = LinearLayoutManager(context)
|
||||||
itemAnimator = DefaultItemAnimator()
|
itemAnimator = DefaultItemAnimator()
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package code.name.monkey.retromusic.dialogs
|
package code.name.monkey.retromusic.dialogs
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.res.ColorStateList
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
@ -62,7 +61,7 @@ class OptionsSheetDialogFragment : RoundedBottomSheetDialogFragment(), View.OnCl
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
disposable.clear()
|
disposable.dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
||||||
|
@ -72,9 +71,11 @@ class OptionsSheetDialogFragment : RoundedBottomSheetDialogFragment(), View.OnCl
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
text!!.setTextColor(ThemeStore.textColorSecondary(context!!))
|
text.setTextColor(ThemeStore.textColorSecondary(context!!))
|
||||||
titleWelcome!!.setTextColor(ThemeStore.textColorPrimary(context!!))
|
text.text = PreferenceUtil.getInstance().userBio
|
||||||
titleWelcome!!.text = String.format("%s %s!", timeOfTheDay, PreferenceUtil.getInstance().userName)
|
titleWelcome.setTextColor(ThemeStore.textColorPrimary(context!!))
|
||||||
|
titleWelcome.text = String.format("%s %s!", timeOfTheDay, PreferenceUtil.getInstance().userName)
|
||||||
|
|
||||||
loadImageFromStorage()
|
loadImageFromStorage()
|
||||||
|
|
||||||
actionSettings.setOnClickListener(this)
|
actionSettings.setOnClickListener(this)
|
||||||
|
@ -99,9 +100,7 @@ class OptionsSheetDialogFragment : RoundedBottomSheetDialogFragment(), View.OnCl
|
||||||
override fun onClick(view: View) {
|
override fun onClick(view: View) {
|
||||||
val mainActivity = activity as MainActivity? ?: return
|
val mainActivity = activity as MainActivity? ?: return
|
||||||
when (view.id) {
|
when (view.id) {
|
||||||
R.id.actionFolders -> {
|
R.id.actionFolders -> mainActivity.setCurrentFragment(FoldersFragment.newInstance(context), true)
|
||||||
mainActivity.setCurrentFragment(FoldersFragment.newInstance(context), true)
|
|
||||||
}
|
|
||||||
R.id.actionSettings -> NavigationUtil.goToSettings(mainActivity)
|
R.id.actionSettings -> NavigationUtil.goToSettings(mainActivity)
|
||||||
R.id.actionAbout -> NavigationUtil.goToAbout(mainActivity)
|
R.id.actionAbout -> NavigationUtil.goToAbout(mainActivity)
|
||||||
R.id.actionSleepTimer -> if (fragmentManager != null) {
|
R.id.actionSleepTimer -> if (fragmentManager != null) {
|
||||||
|
|
|
@ -45,7 +45,7 @@ class SleepTimerDialog : RoundedBottomSheetDialogFragment() {
|
||||||
private var seekArcProgress: Int = 0
|
private var seekArcProgress: Int = 0
|
||||||
private lateinit var timerUpdater: TimerUpdater
|
private lateinit var timerUpdater: TimerUpdater
|
||||||
|
|
||||||
override fun onDismiss(dialog: DialogInterface?) {
|
override fun onDismiss(dialog: DialogInterface) {
|
||||||
super.onDismiss(dialog)
|
super.onDismiss(dialog)
|
||||||
timerUpdater.cancel()
|
timerUpdater.cancel()
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,143 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.exfab;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by hemanths on 3/20/19
|
||||||
|
*/
|
||||||
|
|
||||||
|
import android.animation.AnimatorSet;
|
||||||
|
import android.animation.ObjectAnimator;
|
||||||
|
import android.transition.AutoTransition;
|
||||||
|
import android.transition.Transition;
|
||||||
|
import android.transition.TransitionManager;
|
||||||
|
import android.view.View;
|
||||||
|
|
||||||
|
import com.google.android.material.button.MaterialButton;
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
|
|
||||||
|
import androidx.annotation.DrawableRes;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||||
|
import androidx.constraintlayout.widget.ConstraintSet;
|
||||||
|
import code.name.monkey.retromusic.R;
|
||||||
|
|
||||||
|
public class FabIconAnimator {
|
||||||
|
|
||||||
|
private static final String ROTATION_Y_PROPERTY = "rotationY";
|
||||||
|
|
||||||
|
private static final float TWITCH_END = 20F;
|
||||||
|
private static final float TWITCH_START = 0F;
|
||||||
|
private static final int DURATION = 200;
|
||||||
|
private final MaterialButton button;
|
||||||
|
private final ConstraintLayout container;
|
||||||
|
@DrawableRes
|
||||||
|
private int currentIcon;
|
||||||
|
@StringRes
|
||||||
|
private int currentText;
|
||||||
|
private boolean isAnimating;
|
||||||
|
private final Transition.TransitionListener listener = new Transition.TransitionListener() {
|
||||||
|
public void onTransitionStart(Transition transition) {
|
||||||
|
isAnimating = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onTransitionEnd(Transition transition) {
|
||||||
|
isAnimating = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onTransitionCancel(Transition transition) {
|
||||||
|
isAnimating = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onTransitionPause(Transition transition) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onTransitionResume(Transition transition) {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public FabIconAnimator(ConstraintLayout container) {
|
||||||
|
this.container = container;
|
||||||
|
this.button = container.findViewById(R.id.fab);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void update(@DrawableRes int icon, @StringRes int text) {
|
||||||
|
boolean isSame = currentIcon == icon && currentText == text;
|
||||||
|
currentIcon = icon;
|
||||||
|
currentText = text;
|
||||||
|
animateChange(icon, text, isSame);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnClickListener(@Nullable View.OnClickListener clickListener) {
|
||||||
|
if (clickListener == null) {
|
||||||
|
button.setOnClickListener(null);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
AtomicBoolean flag = new AtomicBoolean(true);
|
||||||
|
button.setOnClickListener(view -> {
|
||||||
|
if (!flag.getAndSet(false)) return;
|
||||||
|
clickListener.onClick(view);
|
||||||
|
button.postDelayed(() -> flag.set(true), 2000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isExtended() { // R.dimen.triple_and_half_margin is 56 dp.
|
||||||
|
return button.getLayoutParams().height != button.getResources().getDimensionPixelSize(R.dimen.triple_and_half_margin);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExtended(boolean extended) {
|
||||||
|
setExtended(extended, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void animateChange(@DrawableRes int icon, @StringRes int text, boolean isSame) {
|
||||||
|
boolean extended = isExtended();
|
||||||
|
button.setText(text);
|
||||||
|
button.setIconResource(icon);
|
||||||
|
setExtended(extended, !isSame);
|
||||||
|
if (!extended) twitch();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setExtended(boolean extended, boolean force) {
|
||||||
|
if (isAnimating || (extended && isExtended() && !force)) return;
|
||||||
|
|
||||||
|
ConstraintSet set = new ConstraintSet();
|
||||||
|
set.clone(container.getContext(), extended ? R.layout.fab_extended : R.layout.fab_collapsed);
|
||||||
|
|
||||||
|
TransitionManager.beginDelayedTransition(container, new AutoTransition()
|
||||||
|
.addListener(listener).setDuration(150));
|
||||||
|
|
||||||
|
if (extended) button.setText(currentText);
|
||||||
|
else button.setText("");
|
||||||
|
|
||||||
|
set.applyTo(container);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void twitch() {
|
||||||
|
AnimatorSet set = new AnimatorSet();
|
||||||
|
ObjectAnimator twitchA = animateProperty(ROTATION_Y_PROPERTY, TWITCH_START, TWITCH_END);
|
||||||
|
ObjectAnimator twitchB = animateProperty(ROTATION_Y_PROPERTY, TWITCH_END, TWITCH_START);
|
||||||
|
|
||||||
|
set.play(twitchB).after(twitchA);
|
||||||
|
set.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
private ObjectAnimator animateProperty(String property, float start, float end) {
|
||||||
|
return ObjectAnimator.ofFloat(container, property, start, end).setDuration(DURATION);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.exfab;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.animation.Interpolator;
|
||||||
|
|
||||||
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
||||||
|
|
||||||
|
public class TransientBarBehavior extends CoordinatorLayout.Behavior<View> {
|
||||||
|
|
||||||
|
private static final Interpolator fastOutSlowInInterpolator = new FastOutSlowInInterpolator();
|
||||||
|
|
||||||
|
public TransientBarBehavior(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean layoutDependsOn(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
|
||||||
|
return dependency instanceof Snackbar.SnackbarLayout;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onDependentViewChanged(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
|
||||||
|
if (child.getVisibility() == View.VISIBLE) {
|
||||||
|
float translationY = this.getViewTranslationYForSnackbar(parent, child);
|
||||||
|
child.setTranslationY(translationY);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDependentViewRemoved(@NonNull CoordinatorLayout parent, @NonNull View child, @NonNull View dependency) {
|
||||||
|
if (dependency instanceof Snackbar.SnackbarLayout && child.getTranslationY() != 0.0F) {
|
||||||
|
ViewCompat.animate(child).translationY(0.0F).scaleX(1.0F).scaleY(1.0F).alpha(1.0F)
|
||||||
|
.setInterpolator(fastOutSlowInInterpolator);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private float getViewTranslationYForSnackbar(CoordinatorLayout parent, View child) {
|
||||||
|
float minOffset = 0.0F;
|
||||||
|
List dependencies = parent.getDependencies(child);
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
for (int z = dependencies.size(); i < z; ++i) {
|
||||||
|
View view = (View) dependencies.get(i);
|
||||||
|
if (view instanceof Snackbar.SnackbarLayout && parent.doViewsOverlap(child, view)) {
|
||||||
|
minOffset = Math.min(minOffset, view.getTranslationY() - (float) view.getHeight());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return minOffset;
|
||||||
|
}
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ package code.name.monkey.retromusic.glide.artistimage
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.rest.LastFMRestClient
|
import code.name.monkey.retromusic.rest.LastFMRestClient
|
||||||
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
import code.name.monkey.retromusic.rest.model.LastFmArtist
|
||||||
import code.name.monkey.retromusic.util.LastFMUtil
|
import code.name.monkey.retromusic.util.LastFMUtil
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.misc;
|
||||||
|
|
||||||
|
import androidx.core.content.FileProvider;
|
||||||
|
|
||||||
|
public class GenericFileProvider extends FileProvider {
|
||||||
|
}
|
|
@ -14,4 +14,6 @@
|
||||||
|
|
||||||
package code.name.monkey.retromusic.model
|
package code.name.monkey.retromusic.model
|
||||||
|
|
||||||
class Contributor(val name: String, val summary: String, val link: String, val profileImage: String)
|
import com.google.gson.annotations.SerializedName
|
||||||
|
|
||||||
|
class Contributor(val name: String, val summary: String, val link: String, @SerializedName("profile_image") val profileImage: String)
|
||||||
|
|
|
@ -17,10 +17,8 @@ package code.name.monkey.retromusic.model.lyrics;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import code.name.monkey.retromusic.model.Song;
|
import code.name.monkey.retromusic.model.Song;
|
||||||
|
|
||||||
|
|
||||||
public class Lyrics {
|
public class Lyrics {
|
||||||
private static final ArrayList<Class<? extends Lyrics>> FORMATS = new ArrayList<>();
|
private static final ArrayList<Class<? extends Lyrics>> FORMATS = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -28,16 +26,12 @@ public class Lyrics {
|
||||||
Lyrics.FORMATS.add(SynchronizedLyricsLRC.class);
|
Lyrics.FORMATS.add(SynchronizedLyricsLRC.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
public Song song;
|
public Song song;
|
||||||
@NonNull
|
|
||||||
public String data;
|
public String data;
|
||||||
|
|
||||||
protected boolean parsed = false;
|
protected boolean parsed = false;
|
||||||
protected boolean valid = false;
|
protected boolean valid = false;
|
||||||
|
|
||||||
@NonNull
|
public static Lyrics parse(Song song, String data) {
|
||||||
public static Lyrics parse(@NonNull Song song, @NonNull String data) {
|
|
||||||
for (Class<? extends Lyrics> format : Lyrics.FORMATS) {
|
for (Class<? extends Lyrics> format : Lyrics.FORMATS) {
|
||||||
try {
|
try {
|
||||||
Lyrics lyrics = format.newInstance().setData(song, data);
|
Lyrics lyrics = format.newInstance().setData(song, data);
|
||||||
|
@ -49,7 +43,7 @@ public class Lyrics {
|
||||||
return new Lyrics().setData(song, data).parse(false);
|
return new Lyrics().setData(song, data).parse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSynchronized(@NonNull String data) {
|
public static boolean isSynchronized(String data) {
|
||||||
for (Class<? extends Lyrics> format : Lyrics.FORMATS) {
|
for (Class<? extends Lyrics> format : Lyrics.FORMATS) {
|
||||||
try {
|
try {
|
||||||
Lyrics lyrics = format.newInstance().setData(null, data);
|
Lyrics lyrics = format.newInstance().setData(null, data);
|
||||||
|
@ -61,13 +55,12 @@ public class Lyrics {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Lyrics setData(@NonNull Song song, @NonNull String data) {
|
public Lyrics setData(Song song, String data) {
|
||||||
this.song = song;
|
this.song = song;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
public Lyrics parse(boolean check) {
|
public Lyrics parse(boolean check) {
|
||||||
this.valid = true;
|
this.valid = true;
|
||||||
this.parsed = true;
|
this.parsed = true;
|
||||||
|
@ -83,7 +76,6 @@ public class Lyrics {
|
||||||
return this.valid;
|
return this.valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
|
||||||
public String getText() {
|
public String getText() {
|
||||||
return this.data.trim().replaceAll("(\r?\n){3,}", "\r\n\r\n");
|
return this.data.trim().replaceAll("(\r?\n){3,}", "\r\n\r\n");
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,16 @@
|
||||||
package code.name.monkey.retromusic.rest;
|
package code.name.monkey.retromusic.rest;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import code.name.monkey.retromusic.rest.service.LastFMService;
|
import code.name.monkey.retromusic.rest.service.LastFMService;
|
||||||
import java.io.File;
|
|
||||||
import okhttp3.Cache;
|
import okhttp3.Cache;
|
||||||
import okhttp3.Call;
|
import okhttp3.Call;
|
||||||
|
import okhttp3.ConnectionPool;
|
||||||
import okhttp3.Interceptor;
|
import okhttp3.Interceptor;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
|
@ -70,6 +74,11 @@ public class LastFMRestClient {
|
||||||
|
|
||||||
public static OkHttpClient.Builder createDefaultOkHttpClientBuilder(Context context) {
|
public static OkHttpClient.Builder createDefaultOkHttpClientBuilder(Context context) {
|
||||||
return new OkHttpClient.Builder()
|
return new OkHttpClient.Builder()
|
||||||
|
.connectionPool(new ConnectionPool(0, 1, TimeUnit.NANOSECONDS))
|
||||||
|
.retryOnConnectionFailure(true)
|
||||||
|
.connectTimeout(1, TimeUnit.MINUTES) // connect timeout
|
||||||
|
.writeTimeout(1, TimeUnit.MINUTES) // write timeout
|
||||||
|
.readTimeout(1, TimeUnit.MINUTES) // read timeout
|
||||||
.cache(createDefaultCache(context))
|
.cache(createDefaultCache(context))
|
||||||
.addInterceptor(createCacheControlInterceptor());
|
.addInterceptor(createCacheControlInterceptor());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.transition.Slide
|
import android.transition.Slide
|
||||||
|
@ -15,6 +16,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -91,10 +93,10 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
||||||
run {
|
run {
|
||||||
if (scrollY > oldScrollY) {
|
if (scrollY > oldScrollY) {
|
||||||
actionShuffleAll!!.setShowTitle(false)
|
actionShuffleAll.shrink(true)
|
||||||
}
|
}
|
||||||
if (scrollY < oldScrollY) {
|
if (scrollY < oldScrollY) {
|
||||||
actionShuffleAll!!.setShowTitle(true)
|
actionShuffleAll.extend(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,7 +257,12 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
|
||||||
val themeColor = if (PreferenceUtil.getInstance().adaptiveColor) color else ThemeStore.accentColor(this)
|
val themeColor = if (PreferenceUtil.getInstance().adaptiveColor) color else ThemeStore.accentColor(this)
|
||||||
songTitle.setTextColor(themeColor)
|
songTitle.setTextColor(themeColor)
|
||||||
moreTitle.setTextColor(themeColor)
|
moreTitle.setTextColor(themeColor)
|
||||||
actionShuffleAll.setColor(themeColor)
|
|
||||||
|
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(themeColor)
|
||||||
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(themeColor))).apply {
|
||||||
|
actionShuffleAll.setTextColor(this)
|
||||||
|
actionShuffleAll.iconTint = this
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
@ -18,6 +19,7 @@ import androidx.recyclerview.widget.GridLayoutManager
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -89,10 +91,10 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
contentContainer.setOnScrollChangeListener { _: NestedScrollView?, _: Int, scrollY: Int, _: Int, oldScrollY: Int ->
|
||||||
run {
|
run {
|
||||||
if (scrollY > oldScrollY) {
|
if (scrollY > oldScrollY) {
|
||||||
actionShuffleAll!!.setShowTitle(false)
|
actionShuffleAll.shrink(true)
|
||||||
}
|
}
|
||||||
if (scrollY < oldScrollY) {
|
if (scrollY < oldScrollY) {
|
||||||
actionShuffleAll!!.setShowTitle(true)
|
actionShuffleAll.extend(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,7 +296,11 @@ class ArtistDetailActivity : AbsSlidingMusicPanelActivity(), ArtistDetailContrac
|
||||||
songTitle.setTextColor(textColor)
|
songTitle.setTextColor(textColor)
|
||||||
biographyTitle.setTextColor(textColor)
|
biographyTitle.setTextColor(textColor)
|
||||||
|
|
||||||
actionShuffleAll.setColor(textColor)
|
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(textColor)
|
||||||
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(textColor))).apply {
|
||||||
|
actionShuffleAll.setTextColor(this)
|
||||||
|
actionShuffleAll.iconTint = this
|
||||||
|
}
|
||||||
|
|
||||||
findViewById<View>(R.id.root).setBackgroundColor(ThemeStore.primaryColor(this))
|
findViewById<View>(R.id.root).setBackgroundColor(ThemeStore.primaryColor(this))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
|
@ -10,6 +11,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
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
|
||||||
|
@ -59,7 +61,7 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
|
|
||||||
setUpToolBar()
|
setUpToolBar()
|
||||||
setupRecyclerView()
|
setupRecyclerView()
|
||||||
actionShuffle.setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(songAdapter!!.dataSet, true) }
|
actionShuffleAll.setOnClickListener { MusicPlayerRemote.openAndShuffleQueue(songAdapter!!.dataSet, true) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpToolBar() {
|
private fun setUpToolBar() {
|
||||||
|
@ -74,7 +76,11 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
setSupportActionBar(this)
|
setSupportActionBar(this)
|
||||||
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@GenreDetailsActivity))
|
ToolbarContentTintHelper.colorBackButton(this, ThemeStore.textColorSecondary(this@GenreDetailsActivity))
|
||||||
}
|
}
|
||||||
actionShuffle.setColor(ThemeStore.accentColor(this@GenreDetailsActivity))
|
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
||||||
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
||||||
|
actionShuffleAll.setTextColor(this)
|
||||||
|
actionShuffleAll.iconTint = this
|
||||||
|
}
|
||||||
title = null
|
title = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,9 +134,9 @@ class GenreDetailsActivity : AbsSlidingMusicPanelActivity(), GenreDetailsContrac
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
if (dy > 0) {
|
if (dy > 0) {
|
||||||
actionShuffle.setShowTitle(false)
|
actionShuffleAll.shrink(true)
|
||||||
} else if (dy < 0) {
|
} else if (dy < 0) {
|
||||||
actionShuffle.setShowTitle(true)
|
actionShuffleAll.extend(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
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
|
||||||
|
@ -69,9 +72,9 @@ class PlayingQueueActivity : AbsMusicServiceActivity() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
if (dy > 0) {
|
if (dy > 0) {
|
||||||
clearQueue.setShowTitle(false)
|
clearQueue.shrink(true)
|
||||||
} else if (dy < 0) {
|
} else if (dy < 0) {
|
||||||
clearQueue.setShowTitle(true)
|
clearQueue.extend(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -146,7 +149,12 @@ class PlayingQueueActivity : AbsMusicServiceActivity() {
|
||||||
setSupportActionBar(toolbar)
|
setSupportActionBar(toolbar)
|
||||||
title = null
|
title = null
|
||||||
toolbar.setNavigationOnClickListener { onBackPressed() }
|
toolbar.setNavigationOnClickListener { onBackPressed() }
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
|
ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this))
|
||||||
clearQueue.setColor(ThemeStore.accentColor(this))
|
clearQueue.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
||||||
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
||||||
|
clearQueue.setTextColor(this)
|
||||||
|
clearQueue.iconTint = this
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
|
@ -9,6 +10,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
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
|
||||||
|
@ -31,7 +33,7 @@ import com.afollestad.materialcab.MaterialCab
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator
|
import com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
|
import com.h6ah4i.android.widget.advrecyclerview.draggable.RecyclerViewDragDropManager
|
||||||
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
import com.h6ah4i.android.widget.advrecyclerview.utils.WrapperAdapterUtils
|
||||||
|
import kotlinx.android.synthetic.main.abs_playlists.*
|
||||||
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
import kotlinx.android.synthetic.main.activity_playlist_detail.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@ -102,13 +104,13 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
super.onScrolled(recyclerView, dx, dy)
|
super.onScrolled(recyclerView, dx, dy)
|
||||||
if (dy > 0) {
|
if (dy > 0) {
|
||||||
actionShuffle.setShowTitle(false)
|
actionShuffleAll.shrink(true)
|
||||||
} else if (dy < 0) {
|
} else if (dy < 0) {
|
||||||
actionShuffle.setShowTitle(true)
|
actionShuffleAll.extend(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
actionShuffle.setOnClickListener {
|
actionShuffleAll.setOnClickListener {
|
||||||
if (adapter.dataSet.isEmpty()) {
|
if (adapter.dataSet.isEmpty()) {
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
|
@ -124,7 +126,12 @@ class PlaylistDetailActivity : AbsSlidingMusicPanelActivity(), CabHolder, Playli
|
||||||
private fun setUpToolBar() {
|
private fun setUpToolBar() {
|
||||||
bannerTitle.text = playlist!!.name
|
bannerTitle.text = playlist!!.name
|
||||||
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
|
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
|
||||||
actionShuffle.setColor(ThemeStore.accentColor(this))
|
|
||||||
|
actionShuffleAll.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
||||||
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
||||||
|
actionShuffleAll.setTextColor(this)
|
||||||
|
actionShuffleAll.iconTint = this
|
||||||
|
}
|
||||||
|
|
||||||
val primaryColor = ThemeStore.primaryColor(this)
|
val primaryColor = ThemeStore.primaryColor(this)
|
||||||
toolbar!!.apply {
|
toolbar!!.apply {
|
||||||
|
|
|
@ -1,25 +1,29 @@
|
||||||
package code.name.monkey.retromusic.ui.activities
|
package code.name.monkey.retromusic.ui.activities
|
||||||
|
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.content.Context
|
import android.content.*
|
||||||
import android.content.ContextWrapper
|
|
||||||
import android.content.Intent
|
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
|
import android.net.Uri
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.provider.DocumentsContract
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
import android.provider.MediaStore.Images.Media
|
import android.provider.MediaStore.Images.Media.getBitmap
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.core.content.FileProvider
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialUtil
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.Constants.USER_BANNER
|
import code.name.monkey.retromusic.Constants.USER_BANNER
|
||||||
import code.name.monkey.retromusic.Constants.USER_PROFILE
|
import code.name.monkey.retromusic.Constants.USER_PROFILE
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity
|
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity
|
||||||
import code.name.monkey.retromusic.util.Compressor
|
import code.name.monkey.retromusic.util.Compressor
|
||||||
import code.name.monkey.retromusic.util.ImageUtil
|
import code.name.monkey.retromusic.util.ImageUtil
|
||||||
|
import code.name.monkey.retromusic.util.ImageUtil.getResizedBitmap
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.list.listItems
|
import com.afollestad.materialdialogs.list.listItems
|
||||||
|
@ -46,8 +50,10 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
setupToolbar()
|
setupToolbar()
|
||||||
|
|
||||||
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
|
bannerTitle.setTextColor(ThemeStore.textColorPrimary(this))
|
||||||
nameContainer.boxStrokeColor = ThemeStore.accentColor(this)
|
MaterialUtil.setTint(nameContainer, false)
|
||||||
name!!.setText(PreferenceUtil.getInstance().userName)
|
MaterialUtil.setTint(bioContainer, false)
|
||||||
|
name.setText(PreferenceUtil.getInstance().userName)
|
||||||
|
bio.setText(PreferenceUtil.getInstance().userBio)
|
||||||
|
|
||||||
if (!PreferenceUtil.getInstance().profileImage.isEmpty()) {
|
if (!PreferenceUtil.getInstance().profileImage.isEmpty()) {
|
||||||
loadImageFromStorage(PreferenceUtil.getInstance().profileImage)
|
loadImageFromStorage(PreferenceUtil.getInstance().profileImage)
|
||||||
|
@ -57,7 +63,7 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
}
|
}
|
||||||
userImage.setOnClickListener {
|
userImage.setOnClickListener {
|
||||||
MaterialDialog(this).show {
|
MaterialDialog(this).show {
|
||||||
title(text = "Set a profile photo")
|
title(text = getString(R.string.set_photo))
|
||||||
listItems(items = listOf(getString(R.string.new_profile_photo), getString(R.string.remove_profile_photo))) { _, position, _ ->
|
listItems(items = listOf(getString(R.string.new_profile_photo), getString(R.string.remove_profile_photo))) { _, position, _ ->
|
||||||
when (position) {
|
when (position) {
|
||||||
0 -> pickNewPhoto()
|
0 -> pickNewPhoto()
|
||||||
|
@ -70,12 +76,19 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
showBannerOptions()
|
showBannerOptions()
|
||||||
}
|
}
|
||||||
next.setOnClickListener {
|
next.setOnClickListener {
|
||||||
val nameString = name!!.text!!.toString().trim { it <= ' ' }
|
val nameString = name.text.toString().trim { it <= ' ' }
|
||||||
if (TextUtils.isEmpty(nameString)) {
|
if (TextUtils.isEmpty(nameString)) {
|
||||||
Toast.makeText(this, "Umm name is empty", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Umm name is empty", Toast.LENGTH_SHORT).show()
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
|
val bioString = bio.text.toString().trim() { it <= ' ' }
|
||||||
|
if (TextUtils.isEmpty(bioString)) {
|
||||||
|
Toast.makeText(this, "Umm bio is empty", Toast.LENGTH_SHORT).show()
|
||||||
|
return@setOnClickListener
|
||||||
|
|
||||||
|
}
|
||||||
PreferenceUtil.getInstance().userName = nameString
|
PreferenceUtil.getInstance().userName = nameString
|
||||||
|
PreferenceUtil.getInstance().userBio = bioString
|
||||||
setResult(Activity.RESULT_OK)
|
setResult(Activity.RESULT_OK)
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
@ -102,7 +115,6 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showBannerOptions() {
|
private fun showBannerOptions() {
|
||||||
|
|
||||||
MaterialDialog(this).show {
|
MaterialDialog(this).show {
|
||||||
title(R.string.select_banner_photo)
|
title(R.string.select_banner_photo)
|
||||||
listItems(items = listOf(getString(R.string.new_banner_photo), getString(R.string.remove_banner_photo)))
|
listItems(items = listOf(getString(R.string.new_banner_photo), getString(R.string.remove_banner_photo)))
|
||||||
|
@ -150,21 +162,60 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
|
|
||||||
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
public override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
if (requestCode == PICK_IMAGE_REQUEST && resultCode == Activity.RESULT_OK && data != null &&
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
data.data != null) {
|
when (requestCode) {
|
||||||
|
PICK_IMAGE_REQUEST -> {
|
||||||
|
val uri = data!!.data
|
||||||
|
try {
|
||||||
|
val bitmap = getResizedBitmap(getBitmap(contentResolver, uri), PROFILE_ICON_SIZE)
|
||||||
|
val profileImagePath = saveToInternalStorage(bitmap, USER_PROFILE)
|
||||||
|
PreferenceUtil.getInstance().saveProfileImage(profileImagePath)
|
||||||
|
loadImageFromStorage(profileImagePath)
|
||||||
|
} catch (e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CROP_IMAGE_REQUEST -> {
|
||||||
|
val extras: Bundle = data?.extras!!
|
||||||
|
val selectedBitmap: Bitmap = extras.getParcelable("data");
|
||||||
|
val profileImagePath = saveToInternalStorage(selectedBitmap, USER_PROFILE)
|
||||||
|
PreferenceUtil.getInstance().saveProfileImage(profileImagePath)
|
||||||
|
loadImageFromStorage(profileImagePath)
|
||||||
|
}
|
||||||
|
PICK_BANNER_REQUEST -> {
|
||||||
|
val uri = data?.data
|
||||||
|
try {
|
||||||
|
val bitmap = getBitmap(contentResolver, uri)
|
||||||
|
val profileImagePath = saveToInternalStorage(bitmap, USER_BANNER)
|
||||||
|
PreferenceUtil.getInstance().setBannerImagePath(profileImagePath)
|
||||||
|
loadBannerFromStorage(profileImagePath)
|
||||||
|
} catch (e: IOException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
CROP_BANNER_REQUEST -> {
|
||||||
|
val extras: Bundle = data?.extras!!
|
||||||
|
val selectedBitmap: Bitmap = extras.getParcelable("data");
|
||||||
|
val profileImagePath = saveToInternalStorage(selectedBitmap, USER_BANNER)
|
||||||
|
PreferenceUtil.getInstance().saveProfileImage(profileImagePath)
|
||||||
|
loadImageFromStorage(profileImagePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*if (requestCode == PICK_IMAGE_REQUEST && resultCode == Activity.RESULT_OK && data != null && data.data != null) {
|
||||||
|
val picturePath = data.data
|
||||||
|
performCrop(picturePath)
|
||||||
|
} else if (requestCode == CROP_IMAGE_REQUEST && resultCode == Activity.RESULT_OK && data != null && data.data != null) {
|
||||||
val uri = data.data
|
val uri = data.data
|
||||||
try {
|
try {
|
||||||
val bitmap = ImageUtil.getResizedBitmap(Media.getBitmap(contentResolver, uri), PROFILE_ICON_SIZE)
|
val bitmap = ImageUtil.getResizedBitmap(Media.getBitmap(contentResolver, uri), PROFILE_ICON_SIZE)
|
||||||
val profileImagePath = saveToInternalStorage(bitmap, USER_PROFILE)
|
val profileImagePath = saveToInternalStorage(bitmap, USER_PROFILE)
|
||||||
PreferenceUtil.getInstance().saveProfileImage(profileImagePath)
|
PreferenceUtil.getInstance().saveProfileImage(profileImagePath)
|
||||||
loadImageFromStorage(profileImagePath)
|
loadImageFromStorage(profileImagePath)
|
||||||
|
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
} else if (requestCode == PICK_BANNER_REQUEST && resultCode == Activity.RESULT_OK && data != null &&
|
||||||
}
|
|
||||||
if (requestCode == PICK_BANNER_REQUEST && resultCode == Activity.RESULT_OK && data != null &&
|
|
||||||
data.data != null) {
|
data.data != null) {
|
||||||
val uri = data.data
|
val uri = data.data
|
||||||
try {
|
try {
|
||||||
|
@ -176,6 +227,80 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun getImagePathFromUri(aUri: Uri?): String? {
|
||||||
|
var imagePath: String? = null
|
||||||
|
if (aUri == null) {
|
||||||
|
return imagePath
|
||||||
|
}
|
||||||
|
if (DocumentsContract.isDocumentUri(App.context, aUri)) {
|
||||||
|
val documentId = DocumentsContract.getDocumentId(aUri)
|
||||||
|
if ("com.android.providers.media.documents" == aUri.authority) {
|
||||||
|
val id = documentId.split(":".toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()[1]
|
||||||
|
val selection = MediaStore.Images.Media._ID + "=" + id
|
||||||
|
imagePath = getImagePath(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, selection)
|
||||||
|
} else if ("com.android.providers.downloads.documents" == aUri.authority) {
|
||||||
|
val contentUri = ContentUris.withAppendedId(Uri.parse("content://downloads/public_downloads"),
|
||||||
|
java.lang.Long.valueOf(documentId))
|
||||||
|
imagePath = getImagePath(contentUri, null)
|
||||||
|
}
|
||||||
|
} else if ("content".equals(aUri.scheme!!, ignoreCase = true)) {
|
||||||
|
imagePath = getImagePath(aUri, null)
|
||||||
|
} else if ("file".equals(aUri.scheme!!, ignoreCase = true)) {
|
||||||
|
imagePath = aUri.path
|
||||||
|
}
|
||||||
|
return imagePath
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun getImagePath(aUri: Uri, aSelection: String?): String? {
|
||||||
|
var path: String? = null
|
||||||
|
val cursor = App.context.contentResolver.query(aUri, null, aSelection, null, null)
|
||||||
|
if (cursor != null) {
|
||||||
|
if (cursor.moveToFirst()) {
|
||||||
|
path = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA))
|
||||||
|
}
|
||||||
|
cursor.close()
|
||||||
|
}
|
||||||
|
return path
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun performBannerCrop(picturePath: Uri?) {
|
||||||
|
val photoUri = FileProvider.getUriForFile(this, "$packageName.provider", File(getImagePathFromUri(picturePath)))
|
||||||
|
try {
|
||||||
|
|
||||||
|
val cropIntent = Intent("com.android.camera.action.CROP")
|
||||||
|
cropIntent.setDataAndType(photoUri, "image/*")
|
||||||
|
cropIntent.putExtra("crop", "true")
|
||||||
|
cropIntent.putExtra("aspectX", 1)
|
||||||
|
cropIntent.putExtra("aspectY", 1)
|
||||||
|
cropIntent.putExtra("return-data", true)
|
||||||
|
cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
|
startActivityForResult(cropIntent, CROP_BANNER_REQUEST)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
val errorMessage = "your device doesn't support the crop action!"
|
||||||
|
Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun performCrop(imageUri: Uri) {
|
||||||
|
val photoUri = FileProvider.getUriForFile(this, "$packageName.provider", File(getImagePathFromUri(imageUri)))
|
||||||
|
try {
|
||||||
|
val cropIntent = Intent("com.android.camera.action.CROP")
|
||||||
|
cropIntent.setDataAndType(photoUri, "image/*")
|
||||||
|
cropIntent.putExtra("crop", "true")
|
||||||
|
cropIntent.putExtra("aspectX", 1)
|
||||||
|
cropIntent.putExtra("aspectY", 1)
|
||||||
|
cropIntent.putExtra("outputX", 280)
|
||||||
|
cropIntent.putExtra("outputY", 280)
|
||||||
|
cropIntent.putExtra("return-data", true)
|
||||||
|
cropIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
|
||||||
|
startActivityForResult(cropIntent, CROP_IMAGE_REQUEST)
|
||||||
|
} catch (anfe: ActivityNotFoundException) {
|
||||||
|
val errorMessage = "your device doesn't support the crop action!"
|
||||||
|
Toast.makeText(this, errorMessage, Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +350,17 @@ class UserInfoActivity : AbsBaseActivity() {
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
private const val PICK_IMAGE_REQUEST = 9002
|
private const val PICK_IMAGE_REQUEST = 9002
|
||||||
private const val PICK_BANNER_REQUEST = 9003
|
private const val CROP_IMAGE_REQUEST = 9003
|
||||||
|
private const val PICK_BANNER_REQUEST = 9004
|
||||||
|
private const val CROP_BANNER_REQUEST = 9005
|
||||||
private const val PROFILE_ICON_SIZE = 400
|
private const val PROFILE_ICON_SIZE = 400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Activity.pickImage(requestCode: Int) {
|
||||||
|
Intent(Intent.ACTION_GET_CONTENT).apply {
|
||||||
|
addCategory(Intent.CATEGORY_OPENABLE)
|
||||||
|
type = "image/*"
|
||||||
|
startActivityForResult(this, requestCode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -28,7 +28,6 @@ import code.name.monkey.retromusic.ui.fragments.player.material.MaterialFragment
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment
|
import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.plain.PlainPlayerFragment
|
import code.name.monkey.retromusic.ui.fragments.player.plain.PlainPlayerFragment
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.simple.SimplePlayerFragment
|
import code.name.monkey.retromusic.ui.fragments.player.simple.SimplePlayerFragment
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.slide.SlidePlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.tiny.TinyPlayerFragment
|
import code.name.monkey.retromusic.ui.fragments.player.tiny.TinyPlayerFragment
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||||
|
@ -195,7 +194,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
||||||
MATERIAL -> MaterialFragment()
|
MATERIAL -> MaterialFragment()
|
||||||
COLOR -> ColorFragment()
|
COLOR -> ColorFragment()
|
||||||
TINY -> TinyPlayerFragment()
|
TINY -> TinyPlayerFragment()
|
||||||
SLIDE -> SlidePlayerFragment()
|
//SLIDE -> SlidePlayerFragment()
|
||||||
else -> PlayerFragment()
|
else -> PlayerFragment()
|
||||||
} // must implement AbsPlayerFragment
|
} // must implement AbsPlayerFragment
|
||||||
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit()
|
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit()
|
||||||
|
@ -262,7 +261,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
||||||
(currentNowPlayingScreen == NORMAL || currentNowPlayingScreen == FLAT)) {
|
(currentNowPlayingScreen == NORMAL || currentNowPlayingScreen == FLAT)) {
|
||||||
super.setLightNavigationBar(true)
|
super.setLightNavigationBar(true)
|
||||||
super.setLightStatusbar(isColorLight)
|
super.setLightStatusbar(isColorLight)
|
||||||
} else if (currentNowPlayingScreen == FULL || (currentNowPlayingScreen == SLIDE) || currentNowPlayingScreen == CARD ||
|
} else if (currentNowPlayingScreen == FULL || currentNowPlayingScreen == CARD ||
|
||||||
currentNowPlayingScreen == FIT || /*currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||*/
|
currentNowPlayingScreen == FIT || /*currentNowPlayingScreen == NowPlayingScreen.CLASSIC ||*/
|
||||||
currentNowPlayingScreen == BLUR || currentNowPlayingScreen == BLUR_CARD) {
|
currentNowPlayingScreen == BLUR || currentNowPlayingScreen == BLUR_CARD) {
|
||||||
super.setLightStatusbar(false)
|
super.setLightStatusbar(false)
|
||||||
|
@ -308,320 +307,3 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/*import android.animation.ArgbEvaluator
|
|
||||||
import android.animation.ValueAnimator
|
|
||||||
import android.annotation.SuppressLint
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.os.PersistableBundle
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.view.ViewTreeObserver
|
|
||||||
import androidx.annotation.FloatRange
|
|
||||||
import androidx.annotation.LayoutRes
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
|
||||||
import code.name.monkey.retromusic.R
|
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.MiniPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.NowPlayingScreen
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.adaptive.AdaptiveFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.blur.BlurPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.card.CardFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.cardblur.CardBlurFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.color.ColorFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.fit.FitFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.flat.FlatPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.full.FullPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.material.MaterialFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.normal.PlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.plain.PlainPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.simple.SimplePlayerFragment
|
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.classic.ClassicPlayerFragment
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
|
||||||
import code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
|
||||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout
|
|
||||||
import com.sothree.slidinguppanel.SlidingUpPanelLayout.PanelState
|
|
||||||
import kotlinx.android.synthetic.main.sliding_music_panel_layout.*
|
|
||||||
|
|
||||||
abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), SlidingUpPanelLayout.PanelSlideListener, AbsPlayerFragment.Callbacks {
|
|
||||||
|
|
||||||
|
|
||||||
private var miniPlayerFragment: MiniPlayerFragment? = null
|
|
||||||
private var playerFragment: AbsPlayerFragment? = null
|
|
||||||
private var currentNowPlayingScreen: NowPlayingScreen? = null
|
|
||||||
private var navigationbarColor: Int = 0
|
|
||||||
private var taskColor: Int = 0
|
|
||||||
private var lightStatusbar: Boolean = false
|
|
||||||
private var lightNavigationBar: Boolean = false
|
|
||||||
private var navigationBarColorAnimator: ValueAnimator? = null
|
|
||||||
private val argbEvaluator = ArgbEvaluator()
|
|
||||||
|
|
||||||
val panelState: SlidingUpPanelLayout.PanelState?
|
|
||||||
get() = slidingLayout.panelState
|
|
||||||
|
|
||||||
private val isOneOfTheseThemes: Boolean
|
|
||||||
get() = (currentNowPlayingScreen == NowPlayingScreen.ADAPTIVE)
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
setContentView(createContentView())
|
|
||||||
|
|
||||||
|
|
||||||
chooseFragmentForTheme()
|
|
||||||
setupSlidingUpPanel()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setBottomBarVisibility(gone: Int) {
|
|
||||||
bottomNavigationView.visibility = gone
|
|
||||||
hideBottomBar(false)
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract fun createContentView(): View
|
|
||||||
|
|
||||||
override fun onServiceConnected() {
|
|
||||||
super.onServiceConnected()
|
|
||||||
if (!MusicPlayerRemote.playingQueue.isEmpty()) {
|
|
||||||
slidingLayout.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
|
||||||
override fun onGlobalLayout() {
|
|
||||||
slidingLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
|
||||||
hideBottomBar(false)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} // don't call hideBottomBar(true) here as it causes a bug with the SlidingUpPanelLayout
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onQueueChanged() {
|
|
||||||
super.onQueueChanged()
|
|
||||||
hideBottomBar(MusicPlayerRemote.playingQueue.isEmpty())
|
|
||||||
}
|
|
||||||
|
|
||||||
fun hideBottomBar(hide: Boolean) {
|
|
||||||
val heightOfBar = resources.getDimensionPixelSize(R.dimen.mini_player_height)
|
|
||||||
val heightOfBarWithTabs = resources.getDimensionPixelSize(R.dimen.mini_player_height_expanded)
|
|
||||||
|
|
||||||
if (hide) {
|
|
||||||
slidingLayout.panelHeight = 0
|
|
||||||
collapsePanel()
|
|
||||||
} else {
|
|
||||||
if (!MusicPlayerRemote.playingQueue.isEmpty()) {
|
|
||||||
slidingLayout.panelHeight = if (bottomNavigationView.visibility == View.VISIBLE) heightOfBarWithTabs else heightOfBar
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected fun wrapSlidingMusicPanel(@LayoutRes resId: Int): View {
|
|
||||||
@SuppressLint("InflateParams")
|
|
||||||
val slidingMusicPanelLayout = layoutInflater.inflate(R.layout.sliding_music_panel_layout, null)
|
|
||||||
val contentContainer = slidingMusicPanelLayout.findViewById<ViewGroup>(R.id.mainContentFrame)
|
|
||||||
layoutInflater.inflate(resId, contentContainer)
|
|
||||||
return slidingMusicPanelLayout
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onBackPressed() {
|
|
||||||
if (!handleBackPress())
|
|
||||||
super.onBackPressed()
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun handleBackPress(): Boolean {
|
|
||||||
if (slidingLayout.panelHeight != 0 && playerFragment!!.onBackPressed())
|
|
||||||
return true
|
|
||||||
if (panelState == SlidingUpPanelLayout.PanelState.EXPANDED) {
|
|
||||||
collapsePanel()
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
fun toggleBottomNavigationView(toggle: Boolean) {
|
|
||||||
bottomNavigationView.visibility = if (toggle) View.GONE else View.VISIBLE
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getBottomNavigationView(): BottomNavigationBarTinted {
|
|
||||||
return bottomNavigationView
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setupSlidingUpPanel() {
|
|
||||||
slidingLayout.viewTreeObserver
|
|
||||||
.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
|
||||||
override fun onGlobalLayout() {
|
|
||||||
slidingLayout.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
|
||||||
|
|
||||||
if (panelState == PanelState.EXPANDED) {
|
|
||||||
onPanelSlide(slidingLayout, 1f)
|
|
||||||
onPanelExpanded()
|
|
||||||
} else if (panelState == PanelState.COLLAPSED) {
|
|
||||||
onPanelCollapsed()
|
|
||||||
} else {
|
|
||||||
playerFragment!!.onHide()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
slidingLayout.addPanelSlideListener(this)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPanelSlide(panel: View?, slideOffset: Float) {
|
|
||||||
|
|
||||||
setMiniPlayerAlphaProgress(slideOffset)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPanelStateChanged(panel: View, previousState: PanelState, newState: PanelState) {
|
|
||||||
when (newState) {
|
|
||||||
SlidingUpPanelLayout.PanelState.COLLAPSED -> onPanelCollapsed()
|
|
||||||
SlidingUpPanelLayout.PanelState.EXPANDED -> onPanelExpanded()
|
|
||||||
SlidingUpPanelLayout.PanelState.ANCHORED -> collapsePanel() // this fixes a bug where the panel would get stuck for some reason
|
|
||||||
else -> {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun onPanelCollapsed() {
|
|
||||||
// restore values
|
|
||||||
super.setLightStatusbar(lightStatusbar)
|
|
||||||
super.setTaskDescriptionColor(taskColor)
|
|
||||||
super.setNavigationbarColor(navigationbarColor)
|
|
||||||
super.setLightNavigationBar(lightNavigationBar)
|
|
||||||
|
|
||||||
|
|
||||||
playerFragment!!.setMenuVisibility(false)
|
|
||||||
playerFragment!!.userVisibleHint = false
|
|
||||||
playerFragment!!.onHide()
|
|
||||||
}
|
|
||||||
|
|
||||||
open fun onPanelExpanded() {
|
|
||||||
val playerFragmentColor = playerFragment!!.paletteColor
|
|
||||||
super.setTaskDescriptionColor(playerFragmentColor)
|
|
||||||
|
|
||||||
playerFragment!!.setMenuVisibility(true)
|
|
||||||
playerFragment!!.userVisibleHint = true
|
|
||||||
playerFragment!!.onShow()
|
|
||||||
onPaletteColorChanged()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setMiniPlayerAlphaProgress(@FloatRange(from = 0.0, to = 1.0) progress: Float) {
|
|
||||||
if (miniPlayerFragment!!.view == null) return
|
|
||||||
val alpha = 1 - progress
|
|
||||||
miniPlayerFragment!!.view!!.alpha = alpha
|
|
||||||
// necessary to make the views below clickable
|
|
||||||
miniPlayerFragment!!.view!!.visibility = if (alpha == 0f) View.GONE else View.VISIBLE
|
|
||||||
|
|
||||||
bottomNavigationView.translationY = progress * 500
|
|
||||||
bottomNavigationView.alpha = alpha
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun chooseFragmentForTheme() {
|
|
||||||
currentNowPlayingScreen = PreferenceUtil.getInstance().nowPlayingScreen
|
|
||||||
|
|
||||||
val fragment: Fragment = when (currentNowPlayingScreen) {
|
|
||||||
NowPlayingScreen.BLUR -> BlurPlayerFragment()
|
|
||||||
NowPlayingScreen.ADAPTIVE -> AdaptiveFragment()
|
|
||||||
NowPlayingScreen.NORMAL -> PlayerFragment()
|
|
||||||
NowPlayingScreen.CARD -> CardFragment()
|
|
||||||
NowPlayingScreen.BLUR_CARD -> CardBlurFragment()
|
|
||||||
NowPlayingScreen.FIT -> FitFragment()
|
|
||||||
NowPlayingScreen.FLAT -> FlatPlayerFragment()
|
|
||||||
NowPlayingScreen.FULL -> FullPlayerFragment()
|
|
||||||
NowPlayingScreen.PLAIN -> PlainPlayerFragment()
|
|
||||||
NowPlayingScreen.SIMPLE -> SimplePlayerFragment()
|
|
||||||
NowPlayingScreen.MATERIAL -> MaterialFragment()
|
|
||||||
NowPlayingScreen.COLOR -> ColorFragment()
|
|
||||||
NowPlayingScreen.CLASSIC -> ClassicPlayerFragment()
|
|
||||||
else -> PlayerFragment()
|
|
||||||
} // must implement AbsPlayerFragment
|
|
||||||
supportFragmentManager.beginTransaction().replace(R.id.playerFragmentContainer, fragment).commit()
|
|
||||||
supportFragmentManager.executePendingTransactions()
|
|
||||||
|
|
||||||
playerFragment = supportFragmentManager.findFragmentById(R.id.playerFragmentContainer) as AbsPlayerFragment
|
|
||||||
miniPlayerFragment = supportFragmentManager.findFragmentById(R.id.miniPlayerFragment) as MiniPlayerFragment
|
|
||||||
miniPlayerFragment!!.view!!.setOnClickListener { expandPanel() }
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onResume() {
|
|
||||||
super.onResume()
|
|
||||||
if (currentNowPlayingScreen != PreferenceUtil.getInstance().nowPlayingScreen) {
|
|
||||||
postRecreate()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun collapsePanel() {
|
|
||||||
slidingLayout.panelState = PanelState.COLLAPSED
|
|
||||||
}
|
|
||||||
|
|
||||||
fun expandPanel() {
|
|
||||||
slidingLayout.panelState = PanelState.EXPANDED
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
override fun onPaletteColorChanged() {
|
|
||||||
if (panelState == PanelState.EXPANDED) {
|
|
||||||
val paletteColor = playerFragment!!.paletteColor
|
|
||||||
super.setTaskDescriptionColor(paletteColor)
|
|
||||||
|
|
||||||
val isColorLight = ColorUtil.isColorLight(paletteColor)
|
|
||||||
if (PreferenceUtil.getInstance().adaptiveColor &&
|
|
||||||
(currentNowPlayingScreen == NowPlayingScreen.NORMAL || currentNowPlayingScreen == NowPlayingScreen.FLAT)) {
|
|
||||||
super.setLightNavigationBar(true)
|
|
||||||
super.setLightStatusbar(isColorLight)
|
|
||||||
} else if (currentNowPlayingScreen == NowPlayingScreen.FULL || currentNowPlayingScreen == NowPlayingScreen.CARD ||
|
|
||||||
currentNowPlayingScreen == NowPlayingScreen.FIT || currentNowPlayingScreen == NowPlayingScreen.CLASSIC||
|
|
||||||
currentNowPlayingScreen == NowPlayingScreen.BLUR || currentNowPlayingScreen == NowPlayingScreen.BLUR_CARD) {
|
|
||||||
super.setLightStatusbar(false)
|
|
||||||
super.setLightNavigationBar(true)
|
|
||||||
} else if (currentNowPlayingScreen == NowPlayingScreen.COLOR) {
|
|
||||||
super.setNavigationbarColor(paletteColor)
|
|
||||||
super.setLightNavigationBar(isColorLight)
|
|
||||||
super.setLightStatusbar(isColorLight)
|
|
||||||
} else {
|
|
||||||
super.setLightStatusbar(ColorUtil.isColorLight(ThemeStore.primaryColor(this)))
|
|
||||||
super.setLightNavigationBar(true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setLightStatusbar(enabled: Boolean) {
|
|
||||||
lightStatusbar = enabled
|
|
||||||
if (panelState == PanelState.COLLAPSED) {
|
|
||||||
super.setLightStatusbar(enabled)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setLightNavigationBar(enabled: Boolean) {
|
|
||||||
lightNavigationBar = enabled
|
|
||||||
if (panelState == PanelState.COLLAPSED) {
|
|
||||||
super.setLightNavigationBar(enabled)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setNavigationbarColor(color: Int) {
|
|
||||||
navigationbarColor = color
|
|
||||||
if (panelState == PanelState.COLLAPSED) {
|
|
||||||
if (navigationBarColorAnimator != null) navigationBarColorAnimator!!.cancel()
|
|
||||||
super.setNavigationbarColor(color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setTaskDescriptionColor(color: Int) {
|
|
||||||
taskColor = color
|
|
||||||
if (panelState == PanelState.COLLAPSED) {
|
|
||||||
super.setTaskDescriptionColor(color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
if (navigationBarColorAnimator != null) navigationBarColorAnimator!!.cancel() // just in case
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
|
|
||||||
val TAG: String = AbsSlidingMusicPanelActivity::class.java.simpleName
|
|
||||||
}
|
|
||||||
fun setAntiDragView( antiDragView:View ) {
|
|
||||||
slidingLayout.setAntiDragView(antiDragView);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package code.name.monkey.retromusic.ui.activities.tageditor
|
||||||
import android.app.Activity
|
import android.app.Activity
|
||||||
import android.app.SearchManager
|
import android.app.SearchManager
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
@ -12,12 +13,15 @@ import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.animation.OvershootInterpolator
|
import android.view.animation.OvershootInterpolator
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity
|
import code.name.monkey.retromusic.ui.activities.base.AbsBaseActivity
|
||||||
import code.name.monkey.retromusic.util.RetroUtil
|
import code.name.monkey.retromusic.util.RetroUtil
|
||||||
import com.afollestad.materialdialogs.MaterialDialog
|
import com.afollestad.materialdialogs.MaterialDialog
|
||||||
import com.afollestad.materialdialogs.list.listItems
|
import com.afollestad.materialdialogs.list.listItems
|
||||||
|
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
import kotlinx.android.synthetic.main.activity_album_tag_editor.*
|
import kotlinx.android.synthetic.main.activity_album_tag_editor.*
|
||||||
import org.jaudiotagger.audio.AudioFile
|
import org.jaudiotagger.audio.AudioFile
|
||||||
import org.jaudiotagger.audio.AudioFileIO
|
import org.jaudiotagger.audio.AudioFileIO
|
||||||
|
@ -32,6 +36,7 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
|
||||||
private var paletteColorPrimary: Int = 0
|
private var paletteColorPrimary: Int = 0
|
||||||
private var isInNoImageMode: Boolean = false
|
private var isInNoImageMode: Boolean = false
|
||||||
private var songPaths: List<String>? = null
|
private var songPaths: List<String>? = null
|
||||||
|
lateinit var saveFab: ExtendedFloatingActionButton
|
||||||
|
|
||||||
protected val show: MaterialDialog
|
protected val show: MaterialDialog
|
||||||
get() = MaterialDialog(this@AbsTagEditorActivity).show {
|
get() = MaterialDialog(this@AbsTagEditorActivity).show {
|
||||||
|
@ -169,7 +174,7 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(contentViewLayout)
|
setContentView(contentViewLayout)
|
||||||
|
|
||||||
|
saveFab = findViewById(R.id.saveTags)
|
||||||
getIntentExtras()
|
getIntentExtras()
|
||||||
|
|
||||||
songPaths = getSongPaths()
|
songPaths = getSongPaths()
|
||||||
|
@ -206,9 +211,7 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
|
||||||
private fun startImagePicker() {
|
private fun startImagePicker() {
|
||||||
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
val intent = Intent(Intent.ACTION_GET_CONTENT)
|
||||||
intent.type = "image/*"
|
intent.type = "image/*"
|
||||||
startActivityForResult(
|
startActivityForResult(Intent.createChooser(intent, getString(R.string.pick_from_local_storage)), REQUEST_CODE_SELECT_IMAGE)
|
||||||
Intent.createChooser(intent, getString(R.string.pick_from_local_storage)),
|
|
||||||
REQUEST_CODE_SELECT_IMAGE)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract fun loadCurrentImage()
|
protected abstract fun loadCurrentImage()
|
||||||
|
@ -220,8 +223,11 @@ abstract class AbsTagEditorActivity : AbsBaseActivity() {
|
||||||
protected abstract fun deleteImage()
|
protected abstract fun deleteImage()
|
||||||
|
|
||||||
private fun setUpFab() {
|
private fun setUpFab() {
|
||||||
saveFab.setColor(ThemeStore.accentColor(this))
|
saveFab.backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(this))
|
||||||
saveFab.setShowTitle(true)
|
ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(this, ColorUtil.isColorLight(ThemeStore.accentColor(this)))).apply {
|
||||||
|
saveFab.setTextColor(this)
|
||||||
|
saveFab.iconTint = this
|
||||||
|
}
|
||||||
saveFab.apply {
|
saveFab.apply {
|
||||||
scaleX = 0f
|
scaleX = 0f
|
||||||
scaleY = 0f
|
scaleY = 0f
|
||||||
|
|
|
@ -14,6 +14,7 @@ import android.widget.Toast
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
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.MaterialUtil
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -89,6 +90,12 @@ class AlbumTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
|
||||||
|
|
||||||
private fun setUpViews() {
|
private fun setUpViews() {
|
||||||
fillViewsWithFileTags()
|
fillViewsWithFileTags()
|
||||||
|
|
||||||
|
MaterialUtil.setTint(yearContainer, false)
|
||||||
|
MaterialUtil.setTint(genreContainer, false)
|
||||||
|
MaterialUtil.setTint(albumTitleContainer, false)
|
||||||
|
MaterialUtil.setTint(albumArtistContainer, false)
|
||||||
|
|
||||||
albumText.addTextChangedListener(this)
|
albumText.addTextChangedListener(this)
|
||||||
albumArtistText.addTextChangedListener(this)
|
albumArtistText.addTextChangedListener(this)
|
||||||
genreTitle.addTextChangedListener(this)
|
genreTitle.addTextChangedListener(this)
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.text.Editable
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import code.name.monkey.appthemehelper.ThemeStore
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialUtil
|
||||||
import code.name.monkey.appthemehelper.util.TintHelper
|
import code.name.monkey.appthemehelper.util.TintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.loaders.SongLoader
|
import code.name.monkey.retromusic.loaders.SongLoader
|
||||||
|
@ -43,6 +44,16 @@ class SongTagEditorActivity : AbsTagEditorActivity(), TextWatcher {
|
||||||
|
|
||||||
private fun setUpViews() {
|
private fun setUpViews() {
|
||||||
fillViewsWithFileTags()
|
fillViewsWithFileTags()
|
||||||
|
MaterialUtil.setTint(songTextContainer)
|
||||||
|
MaterialUtil.setTint(composerContainer, false)
|
||||||
|
MaterialUtil.setTint(albumTextContainer, false)
|
||||||
|
MaterialUtil.setTint(artistContainer, false)
|
||||||
|
MaterialUtil.setTint(albumArtistContainer, false)
|
||||||
|
MaterialUtil.setTint(yearContainer, false)
|
||||||
|
MaterialUtil.setTint(genreContainer, false)
|
||||||
|
MaterialUtil.setTint(trackNumberContainer, false)
|
||||||
|
MaterialUtil.setTint(lyricsContainer, false)
|
||||||
|
|
||||||
albumText.addTextChangedListener(this)
|
albumText.addTextChangedListener(this)
|
||||||
songText.addTextChangedListener(this)
|
songText.addTextChangedListener(this)
|
||||||
albumText.addTextChangedListener(this)
|
albumText.addTextChangedListener(this)
|
||||||
|
|
|
@ -4,12 +4,13 @@ import android.app.Activity
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.TextView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
import code.name.monkey.retromusic.glide.GlideApp
|
||||||
import code.name.monkey.retromusic.model.Contributor
|
import code.name.monkey.retromusic.model.Contributor
|
||||||
import code.name.monkey.retromusic.ui.adapter.base.MediaEntryViewHolder
|
|
||||||
import code.name.monkey.retromusic.util.RetroUtil.openUrl
|
import code.name.monkey.retromusic.util.RetroUtil.openUrl
|
||||||
import code.name.monkey.retromusic.views.NetworkImageView
|
import code.name.monkey.retromusic.views.CircularImageView
|
||||||
|
|
||||||
class ContributorAdapter(private var contributors: List<Contributor>) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() {
|
class ContributorAdapter(private var contributors: List<Contributor>) : RecyclerView.Adapter<ContributorAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
@ -20,29 +21,28 @@ class ContributorAdapter(private var contributors: List<Contributor>) : Recycler
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
val contributor = contributors[position]
|
val contributor = contributors[position]
|
||||||
holder.bindData(contributor)
|
holder.bindData(contributor)
|
||||||
|
holder.itemView.setOnClickListener {
|
||||||
|
openUrl(it!!.context as Activity, contributors[position].link)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount(): Int {
|
override fun getItemCount(): Int {
|
||||||
return contributors.size
|
return contributors.size
|
||||||
}
|
}
|
||||||
|
|
||||||
inner class ViewHolder(itemView: View) : MediaEntryViewHolder(itemView) {
|
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||||
|
val title: TextView = itemView.findViewById(R.id.title)
|
||||||
|
val text: TextView = itemView.findViewById(R.id.text)
|
||||||
|
val image: CircularImageView = itemView.findViewById(R.id.image)
|
||||||
|
|
||||||
internal fun bindData(contributor: Contributor) {
|
internal fun bindData(contributor: Contributor) {
|
||||||
if (title != null) {
|
title.text = contributor.name
|
||||||
title!!.text = contributor.name
|
text.text = contributor.summary
|
||||||
}
|
GlideApp.with(image.context)
|
||||||
if (text != null) {
|
.load(contributor.profileImage)
|
||||||
text!!.text = contributor.summary
|
.error(R.drawable.ic_person_flat)
|
||||||
}
|
.placeholder(R.drawable.ic_person_flat)
|
||||||
if (image is NetworkImageView) {
|
.into(image)
|
||||||
(image as NetworkImageView).setImageUrl(contributor.profileImage)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onClick(v: View?) {
|
|
||||||
super.onClick(v)
|
|
||||||
openUrl(v!!.context as Activity, contributors[adapterPosition].link)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ import code.name.monkey.retromusic.views.MetalRecyclerViewPager
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
import com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||||
|
|
||||||
|
|
||||||
class HomeAdapter(private val activity: AppCompatActivity, private val homes: List<Home>, private val displayMetrics: DisplayMetrics) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
class HomeAdapter(private val activity: AppCompatActivity, private var homes: List<Home>, private val displayMetrics: DisplayMetrics) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||||
|
|
||||||
|
|
||||||
override fun getItemViewType(position: Int): Int {
|
override fun getItemViewType(position: Int): Int {
|
||||||
|
@ -81,6 +81,11 @@ class HomeAdapter(private val activity: AppCompatActivity, private val homes: Li
|
||||||
return homes.size
|
return homes.size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun swapData(finalList: List<Home>) {
|
||||||
|
homes = finalList
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@IntDef(SUGGESTIONS, RECENT_ALBUMS, TOP_ALBUMS, RECENT_ARTISTS, TOP_ARTISTS, GENRES, PLAYLISTS)
|
@IntDef(SUGGESTIONS, RECENT_ALBUMS, TOP_ALBUMS, RECENT_ARTISTS, TOP_ARTISTS, GENRES, PLAYLISTS)
|
||||||
|
|
|
@ -22,6 +22,6 @@ enum class NowPlayingScreen constructor(@param:StringRes @field:StringRes
|
||||||
PLAIN(R.string.plain, R.drawable.np_plain, 3),
|
PLAIN(R.string.plain, R.drawable.np_plain, 3),
|
||||||
TINY(R.string.tiny, R.drawable.np_tiny, 7),
|
TINY(R.string.tiny, R.drawable.np_tiny, 7),
|
||||||
SIMPLE(R.string.simple, R.drawable.np_simple, 8),
|
SIMPLE(R.string.simple, R.drawable.np_simple, 8),
|
||||||
SLIDE(R.string.slide, R.drawable.np_slide, 13)
|
//SLIDE(R.string.slide, R.drawable.np_slide, 13)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
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.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
|
import code.name.monkey.retromusic.util.DensityUtil
|
||||||
import code.name.monkey.retromusic.util.ViewUtil
|
import code.name.monkey.retromusic.util.ViewUtil
|
||||||
import com.google.android.material.appbar.AppBarLayout
|
import com.google.android.material.appbar.AppBarLayout
|
||||||
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
|
||||||
|
@ -64,10 +65,10 @@ abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>,
|
||||||
|
|
||||||
private fun checkForPadding() {
|
private fun checkForPadding() {
|
||||||
val height = if (MusicPlayerRemote.playingQueue.isEmpty())
|
val height = if (MusicPlayerRemote.playingQueue.isEmpty())
|
||||||
resources.getDimensionPixelSize(R.dimen.mini_player_height)
|
DensityUtil.dip2px(context!!, 52f)
|
||||||
else
|
else
|
||||||
0
|
0
|
||||||
recyclerView.setPadding(0, 0, 0, height)
|
recyclerView.setPadding(0, 0, 0, (height * 2.3).toInt())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initLayoutManager() {
|
private fun initLayoutManager() {
|
||||||
|
|
|
@ -16,14 +16,13 @@ open class AbsMusicServiceFragment : Fragment(), MusicServiceEventListener {
|
||||||
var playerActivity: AbsMusicServiceActivity? = null
|
var playerActivity: AbsMusicServiceActivity? = null
|
||||||
private set
|
private set
|
||||||
|
|
||||||
override fun onAttach(context: Context?) {
|
override fun onAttach(context: Context) {
|
||||||
super.onAttach(context)
|
super.onAttach(context)
|
||||||
try {
|
try {
|
||||||
playerActivity = context as AbsMusicServiceActivity?
|
playerActivity = context as AbsMusicServiceActivity?
|
||||||
} catch (e: ClassCastException) {
|
} catch (e: ClassCastException) {
|
||||||
throw RuntimeException(context!!.javaClass.simpleName + " must be an instance of " + AbsMusicServiceActivity::class.java.simpleName)
|
throw RuntimeException(context.javaClass.simpleName + " must be an instance of " + AbsMusicServiceActivity::class.java.simpleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDetach() {
|
override fun onDetach() {
|
||||||
|
|
|
@ -8,39 +8,38 @@ import android.media.MediaMetadataRetriever
|
||||||
import android.os.AsyncTask
|
import android.os.AsyncTask
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.provider.MediaStore
|
import android.provider.MediaStore
|
||||||
|
import android.text.TextUtils
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
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.dialogs.*
|
import code.name.monkey.retromusic.dialogs.*
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
import code.name.monkey.retromusic.interfaces.PaletteColorHolder
|
import code.name.monkey.retromusic.interfaces.PaletteColorHolder
|
||||||
import code.name.monkey.retromusic.model.Song
|
import code.name.monkey.retromusic.model.Song
|
||||||
|
import code.name.monkey.retromusic.model.lyrics.Lyrics
|
||||||
import code.name.monkey.retromusic.ui.activities.tageditor.AbsTagEditorActivity
|
import code.name.monkey.retromusic.ui.activities.tageditor.AbsTagEditorActivity
|
||||||
import code.name.monkey.retromusic.ui.activities.tageditor.SongTagEditorActivity
|
import code.name.monkey.retromusic.ui.activities.tageditor.SongTagEditorActivity
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment
|
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment
|
||||||
import code.name.monkey.retromusic.util.MusicUtil
|
import code.name.monkey.retromusic.util.*
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
|
||||||
import code.name.monkey.retromusic.util.RetroUtil
|
|
||||||
import code.name.monkey.retromusic.views.FitSystemWindowsLayout
|
import code.name.monkey.retromusic.views.FitSystemWindowsLayout
|
||||||
|
import java.io.FileNotFoundException
|
||||||
|
|
||||||
abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItemClickListener, PaletteColorHolder, PlayerAlbumCoverFragment.Callbacks {
|
abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItemClickListener, PaletteColorHolder, PlayerAlbumCoverFragment.Callbacks {
|
||||||
var callbacks: Callbacks? = null
|
var callbacks: Callbacks? = null
|
||||||
private set
|
private set
|
||||||
private var updateIsFavoriteTask: AsyncTask<*, *, *>? = null
|
private var updateIsFavoriteTask: AsyncTask<*, *, *>? = null
|
||||||
|
private var updateLyricsAsyncTask: AsyncTask<*, *, *>? = null
|
||||||
|
private var playerAlbumCoverFragment: PlayerAlbumCoverFragment? = null
|
||||||
|
|
||||||
|
override fun onAttach(context: Context) {
|
||||||
override fun onAttach(context: Context?) {
|
|
||||||
super.onAttach(context)
|
super.onAttach(context)
|
||||||
try {
|
try {
|
||||||
callbacks = context as Callbacks?
|
callbacks = context as Callbacks?
|
||||||
} catch (e: ClassCastException) {
|
} catch (e: ClassCastException) {
|
||||||
throw RuntimeException(context!!.javaClass.simpleName + " must implement " + Callbacks::class.java.simpleName)
|
throw RuntimeException(context.javaClass.simpleName + " must implement " + Callbacks::class.java.simpleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -158,16 +157,21 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItem
|
||||||
|
|
||||||
override fun onServiceConnected() {
|
override fun onServiceConnected() {
|
||||||
updateIsFavorite()
|
updateIsFavorite()
|
||||||
|
updateLyrics()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPlayingMetaChanged() {
|
override fun onPlayingMetaChanged() {
|
||||||
updateIsFavorite()
|
updateIsFavorite()
|
||||||
|
updateLyrics()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
if (updateIsFavoriteTask != null && !updateIsFavoriteTask!!.isCancelled) {
|
if (updateIsFavoriteTask != null && !updateIsFavoriteTask!!.isCancelled) {
|
||||||
updateIsFavoriteTask!!.cancel(true)
|
updateIsFavoriteTask!!.cancel(true)
|
||||||
}
|
}
|
||||||
|
if (updateLyricsAsyncTask != null && !updateLyricsAsyncTask!!.isCancelled) {
|
||||||
|
updateLyricsAsyncTask!!.cancel(true)
|
||||||
|
}
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,16 +206,58 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItem
|
||||||
}.execute(MusicPlayerRemote.currentSong)
|
}.execute(MusicPlayerRemote.currentSong)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressLint("StaticFieldLeak")
|
||||||
|
private fun updateLyrics() {
|
||||||
|
if (updateLyricsAsyncTask != null) updateLyricsAsyncTask!!.cancel(false)
|
||||||
|
|
||||||
|
updateLyricsAsyncTask = object : AsyncTask<Song, Void, Lyrics>() {
|
||||||
|
override fun onPreExecute() {
|
||||||
|
super.onPreExecute()
|
||||||
|
setLyrics(null)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun doInBackground(vararg params: Song): Lyrics? {
|
||||||
|
try {
|
||||||
|
var data: String? = LyricUtil.getStringFromFile(params[0].title, params[0].artistName)
|
||||||
|
return if (TextUtils.isEmpty(data)) {
|
||||||
|
data = MusicUtil.getLyrics(params[0])
|
||||||
|
return if (TextUtils.isEmpty(data)) {
|
||||||
|
null
|
||||||
|
} else {
|
||||||
|
Lyrics.parse(params[0], data)
|
||||||
|
}
|
||||||
|
} else Lyrics.parse(params[0], data!!)
|
||||||
|
} catch (err: FileNotFoundException) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onPostExecute(l: Lyrics?) {
|
||||||
|
setLyrics(l)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onCancelled(s: Lyrics?) {
|
||||||
|
onPostExecute(null)
|
||||||
|
}
|
||||||
|
}.execute(MusicPlayerRemote.currentSong)
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun setLyrics(l: Lyrics?) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
view.setBackgroundColor(ThemeStore.primaryColor(activity!!))
|
view.setBackgroundColor(ThemeStore.primaryColor(activity!!))
|
||||||
if (PreferenceUtil.getInstance().fullScreenMode && view.findViewById<View>(R.id.status_bar) != null) {
|
if (PreferenceUtil.getInstance().fullScreenMode && view.findViewById<View>(R.id.status_bar) != null) {
|
||||||
view.findViewById<View>(R.id.status_bar).visibility = View.GONE
|
view.findViewById<View>(R.id.status_bar).visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
playerAlbumCoverFragment = childFragmentManager.findFragmentById(R.id.playerAlbumCoverFragment) as PlayerAlbumCoverFragment?
|
||||||
|
playerAlbumCoverFragment?.setCallbacks(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSafeArea(safeArea: View) {
|
fun setSafeArea(safeArea: View) {
|
||||||
val layout = safeArea.findViewById<FitSystemWindowsLayout>(code.name.monkey.retromusic.R.id.safeArea)
|
val layout = safeArea.findViewById<FitSystemWindowsLayout>(R.id.safeArea)
|
||||||
if (layout != null) {
|
if (layout != null) {
|
||||||
layout.isFit = !PreferenceUtil.getInstance().fullScreenMode
|
layout.isFit = !PreferenceUtil.getInstance().fullScreenMode
|
||||||
}
|
}
|
||||||
|
@ -224,6 +270,7 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItem
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val TAG: String = AbsPlayerFragment::class.java.simpleName
|
val TAG: String = AbsPlayerFragment::class.java.simpleName
|
||||||
|
const val VISIBILITY_ANIM_DURATION: Long = 300
|
||||||
}
|
}
|
||||||
|
|
||||||
protected fun getUpNextAndQueueTime(): String {
|
protected fun getUpNextAndQueueTime(): String {
|
||||||
|
|
|
@ -72,10 +72,9 @@ class GenreFragment : AbsLibraryPagerRecyclerViewFragment<GenreAdapter, LinearLa
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
override fun onCreateOptionsMenu(menu: Menu?, inflater: MenuInflater?) {
|
|
||||||
super.onCreateOptionsMenu(menu, inflater)
|
super.onCreateOptionsMenu(menu, inflater)
|
||||||
menu!!.removeItem(R.id.action_sort_order)
|
menu.removeItem(R.id.action_sort_order)
|
||||||
menu.removeItem(R.id.action_grid_size)
|
menu.removeItem(R.id.action_grid_size)
|
||||||
menu.removeItem(R.id.action_new_playlist)
|
menu.removeItem(R.id.action_new_playlist)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package code.name.monkey.retromusic.ui.fragments.mainactivity;
|
package code.name.monkey.retromusic.ui.fragments.mainactivity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
@ -35,17 +34,12 @@ import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog;
|
import code.name.monkey.retromusic.dialogs.CreatePlaylistDialog;
|
||||||
import code.name.monkey.retromusic.dialogs.SleepTimerDialog;
|
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
|
|
||||||
import code.name.monkey.retromusic.helper.SortOrder;
|
import code.name.monkey.retromusic.helper.SortOrder;
|
||||||
import code.name.monkey.retromusic.interfaces.CabHolder;
|
import code.name.monkey.retromusic.interfaces.CabHolder;
|
||||||
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
import code.name.monkey.retromusic.interfaces.MainActivityFragmentCallbacks;
|
||||||
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.AbsLibraryPagerRecyclerViewCustomGridSizeFragment;
|
||||||
import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
|
import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment;
|
||||||
import code.name.monkey.retromusic.util.Compressor;
|
import code.name.monkey.retromusic.util.Compressor;
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil;
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil;
|
import code.name.monkey.retromusic.util.PreferenceUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroColorUtil;
|
import code.name.monkey.retromusic.util.RetroColorUtil;
|
||||||
import code.name.monkey.retromusic.util.RetroUtil;
|
import code.name.monkey.retromusic.util.RetroUtil;
|
||||||
|
@ -242,7 +236,7 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
setUpSortOrderMenu(fragment, menu.findItem(R.id.action_sort_order).getSubMenu());
|
setUpSortOrderMenu(fragment, menu.findItem(R.id.action_sort_order).getSubMenu());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
menu.add(0, R.id.action_new_playlist, 0, R.string.new_playlist_title);
|
menu.add(0, R.id.action_new_playlist, 0, R.string.new_playlist_title).setIcon(R.drawable.ic_playlist_add_white_24dp).setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
|
||||||
menu.removeItem(R.id.action_grid_size);
|
menu.removeItem(R.id.action_grid_size);
|
||||||
}
|
}
|
||||||
Activity activity = getActivity();
|
Activity activity = getActivity();
|
||||||
|
@ -387,22 +381,6 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde
|
||||||
case R.id.action_new_playlist:
|
case R.id.action_new_playlist:
|
||||||
CreatePlaylistDialog.Companion.create().show(getChildFragmentManager(), "CREATE_PLAYLIST");
|
CreatePlaylistDialog.Companion.create().show(getChildFragmentManager(), "CREATE_PLAYLIST");
|
||||||
return true;
|
return true;
|
||||||
case R.id.action_shuffle_all:
|
|
||||||
MusicPlayerRemote.INSTANCE.openAndShuffleQueue(SongLoader.INSTANCE.getAllSongs(getContext())
|
|
||||||
.blockingFirst(), true);
|
|
||||||
return true;
|
|
||||||
|
|
||||||
case R.id.action_equalizer:
|
|
||||||
NavigationUtil.openEqualizer(getActivity());
|
|
||||||
return true;
|
|
||||||
case R.id.action_sleep_timer:
|
|
||||||
if (getFragmentManager() != null) {
|
|
||||||
new SleepTimerDialog().show(getFragmentManager(), TAG);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
case R.id.action_settings:
|
|
||||||
startActivity(new Intent(getContext(), SettingsActivity.class));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,11 +77,12 @@ class PlaylistsFragment : AbsLibraryPagerRecyclerViewFragment<PlaylistAdapter, L
|
||||||
adapter!!.swapDataSet(list)
|
adapter!!.swapDataSet(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu?, inflater: MenuInflater?) {
|
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
|
||||||
super.onCreateOptionsMenu(menu, inflater)
|
super.onCreateOptionsMenu(menu, inflater)
|
||||||
menu!!.removeItem(R.id.action_shuffle_all)
|
menu.apply {
|
||||||
menu.removeItem(R.id.action_sort_order)
|
removeItem(R.id.action_sort_order)
|
||||||
menu.removeItem(R.id.action_grid_size)
|
removeItem(R.id.action_grid_size)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
|
@ -31,6 +31,7 @@ import code.name.monkey.retromusic.ui.fragments.base.AbsMainActivityFragment
|
||||||
import code.name.monkey.retromusic.util.Compressor
|
import code.name.monkey.retromusic.util.Compressor
|
||||||
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 code.name.monkey.retromusic.util.RetroUtil
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.disposables.CompositeDisposable
|
import io.reactivex.disposables.CompositeDisposable
|
||||||
|
@ -38,6 +39,7 @@ import io.reactivex.schedulers.Schedulers
|
||||||
import kotlinx.android.synthetic.main.fragment_banner_home.*
|
import kotlinx.android.synthetic.main.fragment_banner_home.*
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks, HomeContract.HomeView {
|
class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallbacks, HomeContract.HomeView {
|
||||||
override fun showEmpty() {
|
override fun showEmpty() {
|
||||||
|
@ -166,8 +168,20 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
||||||
contentContainerView.setBackgroundColor(ThemeStore.primaryColor(context!!))
|
contentContainerView.setBackgroundColor(ThemeStore.primaryColor(context!!))
|
||||||
|
|
||||||
setupToolbar()
|
setupToolbar()
|
||||||
|
homeAdapter = HomeAdapter(mainActivity, ArrayList(), displayMetrics)
|
||||||
|
|
||||||
homePresenter.subscribe()
|
homePresenter.subscribe()
|
||||||
|
|
||||||
|
checkPadding()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun checkPadding() {
|
||||||
|
val marginSpan = when {
|
||||||
|
MusicPlayerRemote.playingQueue.isEmpty() -> RetroUtil.convertDpToPixel(52f, context).toInt()
|
||||||
|
else -> RetroUtil.convertDpToPixel(0f, context).toInt()
|
||||||
|
}
|
||||||
|
|
||||||
|
(recyclerView.layoutParams as ViewGroup.MarginLayoutParams).bottomMargin = (marginSpan * 2.3f).toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupToolbar() {
|
private fun setupToolbar() {
|
||||||
|
@ -210,10 +224,22 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onServiceConnected() {
|
||||||
|
super.onServiceConnected()
|
||||||
|
checkPadding()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onQueueChanged() {
|
||||||
|
super.onQueueChanged()
|
||||||
|
checkPadding()
|
||||||
|
}
|
||||||
|
|
||||||
|
private lateinit var homeAdapter: HomeAdapter
|
||||||
|
|
||||||
override fun showData(list: ArrayList<Home>) {
|
override fun showData(list: ArrayList<Home>) {
|
||||||
val finalList = list.sortedWith(compareBy { it.priority })
|
val finalList = list.sortedWith(compareBy { it.priority })
|
||||||
|
homeAdapter.swapData(finalList)
|
||||||
recyclerView.apply {
|
recyclerView.apply {
|
||||||
val homeAdapter = HomeAdapter(mainActivity, finalList, displayMetrics)
|
|
||||||
layoutManager = LinearLayoutManager(mainActivity)
|
layoutManager = LinearLayoutManager(mainActivity)
|
||||||
adapter = homeAdapter
|
adapter = homeAdapter
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,13 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.FrameLayout
|
||||||
|
import android.widget.TextView
|
||||||
import androidx.viewpager.widget.ViewPager
|
import androidx.viewpager.widget.ViewPager
|
||||||
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.helper.MusicProgressViewUpdateHelper
|
||||||
|
import code.name.monkey.retromusic.model.lyrics.AbsSynchronizedLyrics
|
||||||
|
import code.name.monkey.retromusic.model.lyrics.Lyrics
|
||||||
import code.name.monkey.retromusic.transform.CarousalPagerTransformer
|
import code.name.monkey.retromusic.transform.CarousalPagerTransformer
|
||||||
import code.name.monkey.retromusic.transform.ParallaxPagerTransformer
|
import code.name.monkey.retromusic.transform.ParallaxPagerTransformer
|
||||||
import code.name.monkey.retromusic.ui.adapter.album.AlbumCoverPagerAdapter
|
import code.name.monkey.retromusic.ui.adapter.album.AlbumCoverPagerAdapter
|
||||||
|
@ -17,6 +21,10 @@ import kotlinx.android.synthetic.main.fragment_player_album_cover.*
|
||||||
|
|
||||||
|
|
||||||
class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChangeListener {
|
class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChangeListener {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private var callbacks: Callbacks? = null
|
private var callbacks: Callbacks? = null
|
||||||
private var currentPosition: Int = 0
|
private var currentPosition: Int = 0
|
||||||
private val colorReceiver = object : AlbumCoverPagerAdapter.AlbumCoverFragment.ColorReceiver {
|
private val colorReceiver = object : AlbumCoverPagerAdapter.AlbumCoverFragment.ColorReceiver {
|
||||||
|
@ -28,7 +36,7 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeSlideEffect() {
|
fun removeSlideEffect() {
|
||||||
val transformer = ParallaxPagerTransformer(R.id.player_image)
|
val transformer = ParallaxPagerTransformer(code.name.monkey.retromusic.R.id.player_image)
|
||||||
transformer.setSpeed(0.3f)
|
transformer.setSpeed(0.3f)
|
||||||
viewPager.setPageTransformer(true, transformer)
|
viewPager.setPageTransformer(true, transformer)
|
||||||
|
|
||||||
|
@ -36,11 +44,13 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?): View? {
|
savedInstanceState: Bundle?): View? {
|
||||||
return inflater.inflate(R.layout.fragment_player_album_cover, container, false)
|
return inflater.inflate(code.name.monkey.retromusic.R.layout.fragment_player_album_cover, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
|
||||||
viewPager.addOnPageChangeListener(this)
|
viewPager.addOnPageChangeListener(this)
|
||||||
//noinspection ConstantConditions
|
//noinspection ConstantConditions
|
||||||
if (PreferenceUtil.getInstance().carouselEffect() &&
|
if (PreferenceUtil.getInstance().carouselEffect() &&
|
||||||
|
@ -55,10 +65,13 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
||||||
viewPager.offscreenPageLimit = 2
|
viewPager.offscreenPageLimit = 2
|
||||||
viewPager.setPageTransformer(true, PreferenceUtil.getInstance().albumCoverTransform)
|
viewPager.setPageTransformer(true, PreferenceUtil.getInstance().albumCoverTransform)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
|
||||||
viewPager.removeOnPageChangeListener(this)
|
viewPager.removeOnPageChangeListener(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +138,11 @@ class PlayerAlbumCoverFragment : AbsMusicServiceFragment(), ViewPager.OnPageChan
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val TAG: String = PlayerAlbumCoverFragment::class.java.simpleName
|
val TAG: String = PlayerAlbumCoverFragment::class.java.simpleName
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ class ClassicPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Call
|
||||||
private lateinit var wrappedAdapter: RecyclerView.Adapter<*>
|
private lateinit var wrappedAdapter: RecyclerView.Adapter<*>
|
||||||
private lateinit var recyclerViewDragDropManager: RecyclerViewDragDropManager
|
private lateinit var recyclerViewDragDropManager: RecyclerViewDragDropManager
|
||||||
|
|
||||||
private var lyrics: Lyrics? = null
|
private var lyricsClassic: Lyrics? = null
|
||||||
|
|
||||||
private lateinit var impl: Impl
|
private lateinit var impl: Impl
|
||||||
|
|
||||||
|
@ -335,7 +335,7 @@ class PortraitImpl(private val fragment: ClassicPlayerFragment) : BaseImpl(fragm
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
code.name.monkey.retromusic.R.id.action_share -> {
|
code.name.monkey.retromusic.R.id.action_share -> {
|
||||||
SongShareDialog.create(song).show(fragment.fragmentManager, "SONG_SHARE_DIALOG")
|
SongShareDialog.create(song).show(fragment.fragmentManager!!, "SONG_SHARE_DIALOG")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ class ColorFragment : AbsPlayerFragment() {
|
||||||
|
|
||||||
private var valueAnimator: ValueAnimator? = null
|
private var valueAnimator: ValueAnimator? = null
|
||||||
private var updateLyricsAsyncTask: AsyncTask<*, *, *>? = null
|
private var updateLyricsAsyncTask: AsyncTask<*, *, *>? = null
|
||||||
private var lyrics: Lyrics? = null
|
private var lyricsColor: Lyrics? = null
|
||||||
|
|
||||||
override fun onShow() {
|
override fun onShow() {
|
||||||
playbackControlsFragment!!.show()
|
playbackControlsFragment!!.show()
|
||||||
|
@ -250,7 +250,7 @@ class ColorFragment : AbsPlayerFragment() {
|
||||||
updateLyricsAsyncTask = object : AsyncTask<Void?, Void?, Lyrics?>() {
|
updateLyricsAsyncTask = object : AsyncTask<Void?, Void?, Lyrics?>() {
|
||||||
override fun onPreExecute() {
|
override fun onPreExecute() {
|
||||||
super.onPreExecute()
|
super.onPreExecute()
|
||||||
lyrics = null
|
lyricsColor = null
|
||||||
playerToolbar.menu.removeItem(R.id.action_show_lyrics)
|
playerToolbar.menu.removeItem(R.id.action_show_lyrics)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,11 +262,11 @@ class ColorFragment : AbsPlayerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPostExecute(l: Lyrics?) {
|
override fun onPostExecute(l: Lyrics?) {
|
||||||
lyrics = l
|
lyricsColor = l
|
||||||
if (lyrics == null) {
|
if (lyricsColor == null) {
|
||||||
lyricsView.setText(R.string.no_lyrics_found)
|
lyricsView.setText(R.string.no_lyrics_found)
|
||||||
} else {
|
} else {
|
||||||
lyricsView.text = lyrics!!.text
|
lyricsView.text = lyricsColor!!.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.FrameLayout
|
||||||
|
import android.widget.TextView
|
||||||
import androidx.appcompat.widget.Toolbar
|
import androidx.appcompat.widget.Toolbar
|
||||||
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -14,8 +16,11 @@ import code.name.monkey.retromusic.glide.GlideApp
|
||||||
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
import code.name.monkey.retromusic.glide.RetroGlideExtension
|
||||||
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
import code.name.monkey.retromusic.glide.RetroMusicColoredTarget
|
||||||
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
import code.name.monkey.retromusic.helper.MusicPlayerRemote
|
||||||
|
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
|
||||||
import code.name.monkey.retromusic.loaders.ArtistLoader
|
import code.name.monkey.retromusic.loaders.ArtistLoader
|
||||||
import code.name.monkey.retromusic.model.Song
|
import code.name.monkey.retromusic.model.Song
|
||||||
|
import code.name.monkey.retromusic.model.lyrics.AbsSynchronizedLyrics
|
||||||
|
import code.name.monkey.retromusic.model.lyrics.Lyrics
|
||||||
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
|
import code.name.monkey.retromusic.ui.fragments.base.AbsPlayerFragment
|
||||||
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment
|
import code.name.monkey.retromusic.ui.fragments.player.PlayerAlbumCoverFragment
|
||||||
import code.name.monkey.retromusic.util.NavigationUtil
|
import code.name.monkey.retromusic.util.NavigationUtil
|
||||||
|
@ -24,7 +29,85 @@ import io.reactivex.disposables.CompositeDisposable
|
||||||
import io.reactivex.schedulers.Schedulers
|
import io.reactivex.schedulers.Schedulers
|
||||||
import kotlinx.android.synthetic.main.fragment_full.*
|
import kotlinx.android.synthetic.main.fragment_full.*
|
||||||
|
|
||||||
class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks, MusicProgressViewUpdateHelper.Callback {
|
||||||
|
private lateinit var lyricsLayout: FrameLayout
|
||||||
|
private lateinit var lyricsLine1: TextView
|
||||||
|
private lateinit var lyricsLine2: TextView
|
||||||
|
|
||||||
|
private var lyrics: Lyrics? = null
|
||||||
|
private lateinit var progressViewUpdateHelper: MusicProgressViewUpdateHelper
|
||||||
|
|
||||||
|
override fun onUpdateProgressViews(progress: Int, total: Int) {
|
||||||
|
if (!isLyricsLayoutBound()) return
|
||||||
|
|
||||||
|
if (!isLyricsLayoutVisible()) {
|
||||||
|
hideLyricsLayout()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lyrics !is AbsSynchronizedLyrics) return
|
||||||
|
val synchronizedLyrics = lyrics as AbsSynchronizedLyrics
|
||||||
|
|
||||||
|
lyricsLayout.visibility = View.VISIBLE
|
||||||
|
lyricsLayout.alpha = 1f
|
||||||
|
|
||||||
|
val oldLine = lyricsLine2.text.toString()
|
||||||
|
val line = synchronizedLyrics.getLine(progress)
|
||||||
|
|
||||||
|
if (oldLine != line || oldLine.isEmpty()) {
|
||||||
|
lyricsLine1.text = oldLine
|
||||||
|
lyricsLine2.text = line
|
||||||
|
|
||||||
|
lyricsLine1.visibility = View.VISIBLE
|
||||||
|
lyricsLine2.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
lyricsLine2.measure(View.MeasureSpec.makeMeasureSpec(lyricsLine2.measuredWidth, View.MeasureSpec.EXACTLY), View.MeasureSpec.UNSPECIFIED)
|
||||||
|
val h: Float = lyricsLine2.measuredHeight.toFloat()
|
||||||
|
|
||||||
|
lyricsLine1.alpha = 1f
|
||||||
|
lyricsLine1.translationY = 0f
|
||||||
|
lyricsLine1.animate().alpha(0f).translationY(-h).duration = VISIBILITY_ANIM_DURATION
|
||||||
|
|
||||||
|
lyricsLine2.alpha = 0f
|
||||||
|
lyricsLine2.translationY = h
|
||||||
|
lyricsLine2.animate().alpha(1f).translationY(0f).duration = VISIBILITY_ANIM_DURATION
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isLyricsLayoutVisible(): Boolean {
|
||||||
|
return lyrics != null && lyrics!!.isSynchronized && lyrics!!.isValid
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun isLyricsLayoutBound(): Boolean {
|
||||||
|
return lyricsLayout != null && lyricsLine1 != null && lyricsLine2 != null
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun hideLyricsLayout() {
|
||||||
|
lyricsLayout.animate().alpha(0f).setDuration( VISIBILITY_ANIM_DURATION).withEndAction(Runnable {
|
||||||
|
if (!isLyricsLayoutBound()) return@Runnable
|
||||||
|
lyricsLayout.visibility = View.GONE
|
||||||
|
lyricsLine1.text = null
|
||||||
|
lyricsLine2.text = null
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun setLyrics(l: Lyrics?) {
|
||||||
|
lyrics = l
|
||||||
|
|
||||||
|
if (!isLyricsLayoutBound()) return
|
||||||
|
|
||||||
|
if (!isLyricsLayoutVisible()) {
|
||||||
|
hideLyricsLayout()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
lyricsLine1.text = null
|
||||||
|
lyricsLine2.text = null
|
||||||
|
|
||||||
|
lyricsLayout.visibility = View.VISIBLE
|
||||||
|
lyricsLayout.animate().alpha(1f).duration = VISIBILITY_ANIM_DURATION
|
||||||
|
}
|
||||||
|
|
||||||
override fun playerToolbar(): Toolbar {
|
override fun playerToolbar(): Toolbar {
|
||||||
return playerToolbar
|
return playerToolbar
|
||||||
}
|
}
|
||||||
|
@ -48,11 +131,17 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
lyricsLayout = view.findViewById(R.id.player_lyrics)
|
||||||
|
lyricsLine1 = view.findViewById(R.id.player_lyrics_line1)
|
||||||
|
lyricsLine2 = view.findViewById(R.id.player_lyrics_line2)
|
||||||
|
|
||||||
setUpSubFragments()
|
setUpSubFragments()
|
||||||
setUpPlayerToolbar()
|
setUpPlayerToolbar()
|
||||||
setupArtist()
|
setupArtist()
|
||||||
|
|
||||||
nextSong.isSelected = true
|
nextSong.isSelected = true
|
||||||
|
|
||||||
|
progressViewUpdateHelper = MusicProgressViewUpdateHelper(this, 500, 1000)
|
||||||
|
progressViewUpdateHelper.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupArtist() {
|
private fun setupArtist() {
|
||||||
|
@ -118,6 +207,7 @@ class FullPlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbac
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
progressViewUpdateHelper.stop()
|
||||||
compositeDisposable.dispose()
|
compositeDisposable.dispose()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,21 +69,12 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
||||||
lastColor = color
|
lastColor = color
|
||||||
callbacks!!.onPaletteColorChanged()
|
callbacks!!.onPaletteColorChanged()
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, code.name.monkey.retromusic.R.attr.iconColor), activity)
|
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
|
||||||
|
|
||||||
if (PreferenceUtil.getInstance().adaptiveColor) {
|
if (PreferenceUtil.getInstance().adaptiveColor) {
|
||||||
colorize(color)
|
colorize(color)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val display = activity?.windowManager?.defaultDisplay
|
|
||||||
val outMetrics = DisplayMetrics()
|
|
||||||
display?.getMetrics(outMetrics)
|
|
||||||
|
|
||||||
val density = resources.displayMetrics.density
|
|
||||||
val dpWidth = outMetrics.widthPixels / density
|
|
||||||
|
|
||||||
playerAlbumCoverContainer?.layoutParams?.height = RetroUtil.convertDpToPixel((dpWidth - getCutOff()), context!!).toInt()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getCutOff(): Int {
|
private fun getCutOff(): Int {
|
||||||
|
@ -105,7 +96,7 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
|
||||||
savedInstanceState: Bundle?): View? {
|
savedInstanceState: Bundle?): View? {
|
||||||
|
|
||||||
return inflater.inflate(code.name.monkey.retromusic.R.layout.fragment_player, container, false)
|
return inflater.inflate(R.layout.fragment_player, container, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
@ -113,12 +104,22 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
||||||
setUpSubFragments()
|
setUpSubFragments()
|
||||||
setUpPlayerToolbar()
|
setUpPlayerToolbar()
|
||||||
snowfall.visibility = if (PreferenceUtil.getInstance().isSnowFall) View.VISIBLE else View.GONE
|
snowfall.visibility = if (PreferenceUtil.getInstance().isSnowFall) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
|
|
||||||
|
val display = activity?.windowManager?.defaultDisplay
|
||||||
|
val outMetrics = DisplayMetrics()
|
||||||
|
display?.getMetrics(outMetrics)
|
||||||
|
|
||||||
|
val density = resources.displayMetrics.density
|
||||||
|
val dpWidth = outMetrics.widthPixels / density
|
||||||
|
|
||||||
|
playerAlbumCoverContainer?.layoutParams?.height = RetroUtil.convertDpToPixel((dpWidth - getCutOff()), context!!).toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun setUpSubFragments() {
|
private fun setUpSubFragments() {
|
||||||
playbackControlsFragment = childFragmentManager.findFragmentById(code.name.monkey.retromusic.R.id.playbackControlsFragment) as PlayerPlaybackControlsFragment
|
playbackControlsFragment = childFragmentManager.findFragmentById(R.id.playbackControlsFragment) as PlayerPlaybackControlsFragment
|
||||||
val playerAlbumCoverFragment = childFragmentManager.findFragmentById(code.name.monkey.retromusic.R.id.playerAlbumCoverFragment) as PlayerAlbumCoverFragment
|
|
||||||
playerAlbumCoverFragment.setCallbacks(this)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setUpPlayerToolbar() {
|
private fun setUpPlayerToolbar() {
|
||||||
|
@ -126,7 +127,7 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
||||||
playerToolbar.setNavigationOnClickListener { activity!!.onBackPressed() }
|
playerToolbar.setNavigationOnClickListener { activity!!.onBackPressed() }
|
||||||
playerToolbar.setOnMenuItemClickListener(this)
|
playerToolbar.setOnMenuItemClickListener(this)
|
||||||
|
|
||||||
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, code.name.monkey.retromusic.R.attr.iconColor), activity)
|
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, ATHUtil.resolveColor(context, R.attr.iconColor), activity)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onServiceConnected() {
|
override fun onServiceConnected() {
|
||||||
|
@ -144,7 +145,6 @@ class PlayerFragment : AbsPlayerFragment(), PlayerAlbumCoverFragment.Callbacks {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
|
|
||||||
fun newInstance(): PlayerFragment {
|
fun newInstance(): PlayerFragment {
|
||||||
return PlayerFragment()
|
return PlayerFragment()
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,10 +71,11 @@ abstract class AbsSettingsFragment : PreferenceFragmentCompat() {
|
||||||
if (dialogFragment != null) {
|
if (dialogFragment != null) {
|
||||||
// The dialog was created (it was one of our custom Preferences), show the dialog for it
|
// The dialog was created (it was one of our custom Preferences), show the dialog for it
|
||||||
dialogFragment.setTargetFragment(this, 0);
|
dialogFragment.setTargetFragment(this, 0);
|
||||||
dialogFragment.show(this.fragmentManager, "android.support.v7.preference.PreferenceFragment.DIALOG");
|
dialogFragment.show(this.fragmentManager!!, "android.support.v7.preference.PreferenceFragment.DIALOG");
|
||||||
} else {
|
} else {
|
||||||
// Dialog creation could not be handled here. Try with the super method.
|
// Dialog creation could not be handled here. Try with the super method.
|
||||||
super.onDisplayPreferenceDialog(preference);
|
super.onDisplayPreferenceDialog(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
package code.name.monkey.retromusic.ui.fragments.settings
|
package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.pm.PackageManager
|
|
||||||
import android.content.pm.ResolveInfo
|
|
||||||
import android.media.audiofx.AudioEffect
|
import android.media.audiofx.AudioEffect
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.preference.Preference
|
import androidx.preference.Preference
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
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
|
||||||
|
@ -17,7 +14,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
|
||||||
class AudioSettings : AbsSettingsFragment() {
|
class AudioSettings : AbsSettingsFragment() {
|
||||||
override fun invalidateSettings() {
|
override fun invalidateSettings() {
|
||||||
val findPreference = findPreference("equalizer")
|
val findPreference: Preference = findPreference("equalizer")!!
|
||||||
if (!hasEqualizer() && PreferenceUtil.getInstance().selectedEqualizer != "retro") {
|
if (!hasEqualizer() && PreferenceUtil.getInstance().selectedEqualizer != "retro") {
|
||||||
findPreference.isEnabled = false
|
findPreference.isEnabled = false
|
||||||
findPreference.summary = resources.getString(R.string.no_equalizer)
|
findPreference.summary = resources.getString(R.string.no_equalizer)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.preference.Preference
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +11,7 @@ import code.name.monkey.retromusic.R
|
||||||
|
|
||||||
class ImageSettingFragment : AbsSettingsFragment() {
|
class ImageSettingFragment : AbsSettingsFragment() {
|
||||||
override fun invalidateSettings() {
|
override fun invalidateSettings() {
|
||||||
val autoDownloadImagesPolicy = findPreference("auto_download_images_policy")
|
val autoDownloadImagesPolicy: Preference = findPreference("auto_download_images_policy")!!
|
||||||
setSummary(autoDownloadImagesPolicy)
|
setSummary(autoDownloadImagesPolicy)
|
||||||
autoDownloadImagesPolicy.setOnPreferenceChangeListener { _, o ->
|
autoDownloadImagesPolicy.setOnPreferenceChangeListener { _, o ->
|
||||||
setSummary(autoDownloadImagesPolicy, o)
|
setSummary(autoDownloadImagesPolicy, o)
|
||||||
|
@ -25,7 +26,7 @@ class ImageSettingFragment : AbsSettingsFragment() {
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val preference = findPreference("auto_download_images_policy")
|
val preference: Preference = findPreference("auto_download_images_policy")!!
|
||||||
setSummary(preference)
|
setSummary(preference)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,8 @@ package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.preference.TwoStatePreference
|
import androidx.preference.TwoStatePreference
|
||||||
|
|
||||||
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.service.MusicService
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,7 +13,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
|
|
||||||
class NotificationSettingsFragment : AbsSettingsFragment() {
|
class NotificationSettingsFragment : AbsSettingsFragment() {
|
||||||
override fun invalidateSettings() {
|
override fun invalidateSettings() {
|
||||||
val classicNotification = findPreference("classic_notification") as TwoStatePreference
|
val classicNotification: TwoStatePreference = findPreference("classic_notification")!!
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {
|
||||||
classicNotification.isVisible = false
|
classicNotification.isVisible = false
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -3,10 +3,10 @@ package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.preference.Preference
|
||||||
import androidx.preference.TwoStatePreference
|
import androidx.preference.TwoStatePreference
|
||||||
import code.name.monkey.retromusic.App
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
|
||||||
import code.name.monkey.retromusic.util.PreferenceUtil.*
|
import code.name.monkey.retromusic.util.PreferenceUtil.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,7 +19,7 @@ class NowPlayingSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSh
|
||||||
updateNowPlayingScreenSummary()
|
updateNowPlayingScreenSummary()
|
||||||
updateAlbumCoverStyleSummary()
|
updateAlbumCoverStyleSummary()
|
||||||
|
|
||||||
val carouselEffect = findPreference("carousel_effect") as TwoStatePreference
|
val carouselEffect: TwoStatePreference = findPreference("carousel_effect")!!
|
||||||
carouselEffect.setOnPreferenceChangeListener { _, newValue ->
|
carouselEffect.setOnPreferenceChangeListener { _, newValue ->
|
||||||
if (newValue as Boolean && !App.isProVersion) {
|
if (newValue as Boolean && !App.isProVersion) {
|
||||||
showProToastAndNavigate(activity!!.getString(R.string.pref_title_toggle_carousel_effect))
|
showProToastAndNavigate(activity!!.getString(R.string.pref_title_toggle_carousel_effect))
|
||||||
|
@ -34,17 +34,19 @@ class NowPlayingSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSh
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateAlbumCoverStyleSummary() {
|
private fun updateAlbumCoverStyleSummary() {
|
||||||
findPreference(ALBUM_COVER_STYLE).setSummary(getInstance().albumCoverStyle.titleRes)
|
val preference: Preference = findPreference(ALBUM_COVER_STYLE)!!
|
||||||
|
preference.setSummary(getInstance().albumCoverStyle.titleRes)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateNowPlayingScreenSummary() {
|
private fun updateNowPlayingScreenSummary() {
|
||||||
findPreference(NOW_PLAYING_SCREEN_ID).setSummary(getInstance().nowPlayingScreen.titleRes)
|
val preference: Preference = findPreference(NOW_PLAYING_SCREEN_ID)!!
|
||||||
|
preference.setSummary(getInstance().nowPlayingScreen.titleRes)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
getInstance().registerOnSharedPreferenceChangedListener(this)
|
getInstance().registerOnSharedPreferenceChangedListener(this)
|
||||||
val preference = findPreference("album_cover_transform")
|
val preference: Preference = findPreference("album_cover_transform")!!
|
||||||
setSummary(preference)
|
setSummary(preference)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.preference.Preference
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
|
||||||
|
@ -22,7 +23,7 @@ class OtherSettingsFragment : AbsSettingsFragment() {
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
val preference = findPreference("last_added_interval")
|
val preference: Preference = findPreference("last_added_interval")!!
|
||||||
setSummary(preference)
|
setSummary(preference)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package code.name.monkey.retromusic.ui.fragments.settings
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.preference.Preference
|
||||||
import androidx.preference.TwoStatePreference
|
import androidx.preference.TwoStatePreference
|
||||||
import code.name.monkey.retromusic.App
|
import code.name.monkey.retromusic.App
|
||||||
import code.name.monkey.retromusic.R
|
import code.name.monkey.retromusic.R
|
||||||
|
@ -12,7 +13,7 @@ import code.name.monkey.retromusic.util.PreferenceUtil
|
||||||
class PersonaizeSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSharedPreferenceChangeListener {
|
class PersonaizeSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSharedPreferenceChangeListener {
|
||||||
|
|
||||||
override fun invalidateSettings() {
|
override fun invalidateSettings() {
|
||||||
val cornerWindow = findPreference("corner_window") as TwoStatePreference
|
val cornerWindow: TwoStatePreference = findPreference("corner_window")!!
|
||||||
cornerWindow.setOnPreferenceChangeListener { _, newValue ->
|
cornerWindow.setOnPreferenceChangeListener { _, newValue ->
|
||||||
if (newValue as Boolean && !App.isProVersion) {
|
if (newValue as Boolean && !App.isProVersion) {
|
||||||
showProToastAndNavigate(activity!!.getString(R.string.pref_title_round_corners))
|
showProToastAndNavigate(activity!!.getString(R.string.pref_title_round_corners))
|
||||||
|
@ -23,7 +24,7 @@ class PersonaizeSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val toggleFullScreen = findPreference("toggle_full_screen") as TwoStatePreference
|
val toggleFullScreen: TwoStatePreference = findPreference("toggle_full_screen")!!
|
||||||
toggleFullScreen.setOnPreferenceChangeListener { _, _ ->
|
toggleFullScreen.setOnPreferenceChangeListener { _, _ ->
|
||||||
activity!!.recreate()
|
activity!!.recreate()
|
||||||
true
|
true
|
||||||
|
@ -40,14 +41,14 @@ class PersonaizeSettingsFragment : AbsSettingsFragment(), SharedPreferences.OnSh
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
PreferenceUtil.getInstance().registerOnSharedPreferenceChangedListener(this)
|
PreferenceUtil.getInstance().registerOnSharedPreferenceChangedListener(this)
|
||||||
|
|
||||||
var preference = findPreference("album_grid_style")
|
var preference: Preference? = findPreference("album_grid_style")
|
||||||
setSummary(preference)
|
setSummary(preference!!)
|
||||||
preference = findPreference("artist_grid_style")
|
preference = findPreference("artist_grid_style")
|
||||||
setSummary(preference)
|
setSummary(preference!!)
|
||||||
preference = findPreference("home_artist_grid_style")
|
preference = findPreference("home_artist_grid_style")
|
||||||
setSummary(preference)
|
setSummary(preference!!)
|
||||||
preference = findPreference("tab_text_mode")
|
preference = findPreference("tab_text_mode")
|
||||||
setSummary(preference)
|
setSummary(preference!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import android.graphics.Color.BLUE
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.preference.Preference
|
||||||
import androidx.preference.TwoStatePreference
|
import androidx.preference.TwoStatePreference
|
||||||
import code.name.monkey.appthemehelper.*
|
import code.name.monkey.appthemehelper.*
|
||||||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
|
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
|
||||||
|
@ -25,7 +26,7 @@ import com.afollestad.materialdialogs.color.colorChooser
|
||||||
class ThemeSettingsFragment : AbsSettingsFragment() {
|
class ThemeSettingsFragment : AbsSettingsFragment() {
|
||||||
|
|
||||||
override fun invalidateSettings() {
|
override fun invalidateSettings() {
|
||||||
val primaryColorPref = findPreference("primary_color") as ATEColorPreference
|
val primaryColorPref: ATEColorPreference = findPreference("primary_color")!!
|
||||||
primaryColorPref.isVisible = PreferenceUtil.getInstance().generalTheme == code.name.monkey.retromusic.R.style.Theme_RetroMusic_Color
|
primaryColorPref.isVisible = PreferenceUtil.getInstance().generalTheme == code.name.monkey.retromusic.R.style.Theme_RetroMusic_Color
|
||||||
val primaryColor = ThemeStore.primaryColor(activity!!)
|
val primaryColor = ThemeStore.primaryColor(activity!!)
|
||||||
primaryColorPref.setColor(primaryColor, ColorUtil.darkenColor(primaryColor))
|
primaryColorPref.setColor(primaryColor, ColorUtil.darkenColor(primaryColor))
|
||||||
|
@ -49,7 +50,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
val generalTheme = findPreference("general_theme")
|
val generalTheme: Preference = findPreference("general_theme")!!
|
||||||
setSummary(generalTheme)
|
setSummary(generalTheme)
|
||||||
generalTheme.setOnPreferenceChangeListener { _, newValue ->
|
generalTheme.setOnPreferenceChangeListener { _, newValue ->
|
||||||
val theme = newValue as String
|
val theme = newValue as String
|
||||||
|
@ -85,7 +86,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
val accentColorPref = findPreference("accent_color") as ATEColorPreference
|
val accentColorPref: ATEColorPreference = findPreference("accent_color")!!
|
||||||
val accentColor = ThemeStore.accentColor(activity!!)
|
val accentColor = ThemeStore.accentColor(activity!!)
|
||||||
accentColorPref.setColor(accentColor, ColorUtil.darkenColor(accentColor))
|
accentColorPref.setColor(accentColor, ColorUtil.darkenColor(accentColor))
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
|
||||||
return@setOnPreferenceClickListener true
|
return@setOnPreferenceClickListener true
|
||||||
}
|
}
|
||||||
|
|
||||||
val colorAppShortcuts = findPreference("should_color_app_shortcuts") as TwoStatePreference
|
val colorAppShortcuts: TwoStatePreference = findPreference("should_color_app_shortcuts")!!
|
||||||
if (!VersionUtils.hasNougatMR()) {
|
if (!VersionUtils.hasNougatMR()) {
|
||||||
colorAppShortcuts.isVisible = false
|
colorAppShortcuts.isVisible = false
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -0,0 +1,202 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.util;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.content.ContentUris;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.content.pm.ResolveInfo;
|
||||||
|
import android.content.res.AssetFileDescriptor;
|
||||||
|
import android.database.Cursor;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.BitmapFactory;
|
||||||
|
import android.graphics.Matrix;
|
||||||
|
import android.media.ExifInterface;
|
||||||
|
import android.net.Uri;
|
||||||
|
import android.provider.DocumentsContract;
|
||||||
|
import android.provider.MediaStore;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import code.name.monkey.retromusic.App;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author: Mario Velasco Casquero
|
||||||
|
* Date: 08/09/2015
|
||||||
|
* Email: m3ario@gmail.com
|
||||||
|
*/
|
||||||
|
public class ImagePicker {
|
||||||
|
private static final int DEFAULT_MIN_WIDTH_QUALITY = 400; // min pixels
|
||||||
|
private static final String TAG = "ImagePicker";
|
||||||
|
private static final String TEMP_IMAGE_NAME = "tempImage";
|
||||||
|
public static int minWidthQuality = DEFAULT_MIN_WIDTH_QUALITY;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static List<Intent> addIntentsToList(Context context, List<Intent> list, Intent intent) {
|
||||||
|
List<ResolveInfo> resInfo = context.getPackageManager().queryIntentActivities(intent, 0);
|
||||||
|
for (ResolveInfo resolveInfo : resInfo) {
|
||||||
|
String packageName = resolveInfo.activityInfo.packageName;
|
||||||
|
Intent targetedIntent = new Intent(intent);
|
||||||
|
targetedIntent.setPackage(packageName);
|
||||||
|
list.add(targetedIntent);
|
||||||
|
Log.d(TAG, "Intent: " + intent.getAction() + " package: " + packageName);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Bitmap getImageFromResult(Context context, int resultCode,
|
||||||
|
Intent imageReturnedIntent) {
|
||||||
|
Log.d(TAG, "getImageFromResult, resultCode: " + resultCode);
|
||||||
|
Bitmap bm = null;
|
||||||
|
File imageFile = getTempFile(context);
|
||||||
|
if (resultCode == Activity.RESULT_OK) {
|
||||||
|
Uri selectedImage;
|
||||||
|
boolean isCamera = (imageReturnedIntent == null ||
|
||||||
|
imageReturnedIntent.getData() == null ||
|
||||||
|
imageReturnedIntent.getData().toString().contains(imageFile.toString()));
|
||||||
|
if (isCamera) { /** CAMERA **/
|
||||||
|
selectedImage = Uri.fromFile(imageFile);
|
||||||
|
} else { /** ALBUM **/
|
||||||
|
selectedImage = imageReturnedIntent.getData();
|
||||||
|
}
|
||||||
|
Log.d(TAG, "selectedImage: " + selectedImage);
|
||||||
|
|
||||||
|
bm = getImageResized(context, selectedImage);
|
||||||
|
int rotation = getRotation(context, selectedImage, isCamera);
|
||||||
|
bm = rotate(bm, rotation);
|
||||||
|
}
|
||||||
|
return bm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static File getTempFile(Context context) {
|
||||||
|
File imageFile = new File(context.getExternalCacheDir(), TEMP_IMAGE_NAME);
|
||||||
|
imageFile.getParentFile().mkdirs();
|
||||||
|
return imageFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Bitmap decodeBitmap(Context context, Uri theUri, int sampleSize) {
|
||||||
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
||||||
|
options.inSampleSize = sampleSize;
|
||||||
|
|
||||||
|
AssetFileDescriptor fileDescriptor = null;
|
||||||
|
try {
|
||||||
|
fileDescriptor = context.getContentResolver().openAssetFileDescriptor(theUri, "r");
|
||||||
|
} catch (FileNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
Bitmap actuallyUsableBitmap = BitmapFactory.decodeFileDescriptor(
|
||||||
|
fileDescriptor.getFileDescriptor(), null, options);
|
||||||
|
|
||||||
|
Log.d(TAG, options.inSampleSize + " sample method bitmap ... " +
|
||||||
|
actuallyUsableBitmap.getWidth() + " " + actuallyUsableBitmap.getHeight());
|
||||||
|
|
||||||
|
return actuallyUsableBitmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resize to avoid using too much memory loading big images (e.g.: 2560*1920)
|
||||||
|
**/
|
||||||
|
private static Bitmap getImageResized(Context context, Uri selectedImage) {
|
||||||
|
Bitmap bm = null;
|
||||||
|
int[] sampleSizes = new int[]{5, 3, 2, 1};
|
||||||
|
int i = 0;
|
||||||
|
do {
|
||||||
|
bm = decodeBitmap(context, selectedImage, sampleSizes[i]);
|
||||||
|
Log.d(TAG, "resizer: new bitmap width = " + bm.getWidth());
|
||||||
|
i++;
|
||||||
|
} while (bm.getWidth() < minWidthQuality && i < sampleSizes.length);
|
||||||
|
return bm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static int getRotation(Context context, Uri imageUri, boolean isCamera) {
|
||||||
|
int rotation;
|
||||||
|
if (isCamera) {
|
||||||
|
rotation = getRotationFromCamera(context, imageUri);
|
||||||
|
} else {
|
||||||
|
rotation = getRotationFromGallery(context, imageUri);
|
||||||
|
}
|
||||||
|
Log.d(TAG, "Image rotation: " + rotation);
|
||||||
|
return rotation;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static int getRotationFromCamera(Context context, Uri imageFile) {
|
||||||
|
int rotate = 0;
|
||||||
|
try {
|
||||||
|
|
||||||
|
context.getContentResolver().notifyChange(imageFile, null);
|
||||||
|
ExifInterface exif = new ExifInterface(imageFile.getPath());
|
||||||
|
int orientation = exif.getAttributeInt(
|
||||||
|
ExifInterface.TAG_ORIENTATION,
|
||||||
|
ExifInterface.ORIENTATION_NORMAL);
|
||||||
|
|
||||||
|
switch (orientation) {
|
||||||
|
case ExifInterface.ORIENTATION_ROTATE_270:
|
||||||
|
rotate = 270;
|
||||||
|
break;
|
||||||
|
case ExifInterface.ORIENTATION_ROTATE_180:
|
||||||
|
rotate = 180;
|
||||||
|
break;
|
||||||
|
case ExifInterface.ORIENTATION_ROTATE_90:
|
||||||
|
rotate = 90;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return rotate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getRotationFromGallery(Context context, Uri imageUri) {
|
||||||
|
int result = 0;
|
||||||
|
String[] columns = {MediaStore.Images.Media.ORIENTATION};
|
||||||
|
Cursor cursor = null;
|
||||||
|
try {
|
||||||
|
cursor = context.getContentResolver().query(imageUri, columns, null, null, null);
|
||||||
|
if (cursor != null && cursor.moveToFirst()) {
|
||||||
|
int orientationColumnIndex = cursor.getColumnIndex(columns[0]);
|
||||||
|
result = cursor.getInt(orientationColumnIndex);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
//Do nothing
|
||||||
|
} finally {
|
||||||
|
if (cursor != null) {
|
||||||
|
cursor.close();
|
||||||
|
}
|
||||||
|
}//End of try-catch block
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static Bitmap rotate(Bitmap bm, int rotation) {
|
||||||
|
if (rotation != 0) {
|
||||||
|
Matrix matrix = new Matrix();
|
||||||
|
matrix.postRotate(rotation);
|
||||||
|
Bitmap bmOut = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true);
|
||||||
|
return bmOut;
|
||||||
|
}
|
||||||
|
return bm;
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,15 +21,16 @@ import android.content.SharedPreferences.Editor;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
|
|
||||||
|
import androidx.annotation.LayoutRes;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.StyleRes;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
|
import com.google.android.material.bottomnavigation.LabelVisibilityMode;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import androidx.annotation.LayoutRes;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.StyleRes;
|
|
||||||
import androidx.viewpager.widget.ViewPager;
|
|
||||||
import code.name.monkey.retromusic.App;
|
import code.name.monkey.retromusic.App;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.helper.SortOrder;
|
import code.name.monkey.retromusic.helper.SortOrder;
|
||||||
|
@ -38,8 +39,8 @@ import code.name.monkey.retromusic.transform.DepthTransformation;
|
||||||
import code.name.monkey.retromusic.transform.HingeTransformation;
|
import code.name.monkey.retromusic.transform.HingeTransformation;
|
||||||
import code.name.monkey.retromusic.transform.HorizontalFlipTransformation;
|
import code.name.monkey.retromusic.transform.HorizontalFlipTransformation;
|
||||||
import code.name.monkey.retromusic.transform.NormalPageTransformer;
|
import code.name.monkey.retromusic.transform.NormalPageTransformer;
|
||||||
import code.name.monkey.retromusic.transform.VerticalStackTransformer;
|
|
||||||
import code.name.monkey.retromusic.transform.VerticalFlipTransformation;
|
import code.name.monkey.retromusic.transform.VerticalFlipTransformation;
|
||||||
|
import code.name.monkey.retromusic.transform.VerticalStackTransformer;
|
||||||
import code.name.monkey.retromusic.ui.activities.MainActivity;
|
import code.name.monkey.retromusic.ui.activities.MainActivity;
|
||||||
import code.name.monkey.retromusic.ui.fragments.AlbumCoverStyle;
|
import code.name.monkey.retromusic.ui.fragments.AlbumCoverStyle;
|
||||||
import code.name.monkey.retromusic.ui.fragments.NowPlayingScreen;
|
import code.name.monkey.retromusic.ui.fragments.NowPlayingScreen;
|
||||||
|
@ -61,6 +62,7 @@ public final class PreferenceUtil {
|
||||||
public static final String GENERAL_THEME = "general_theme";
|
public static final String GENERAL_THEME = "general_theme";
|
||||||
public static final String CIRCULAR_ALBUM_ART = "circular_album_art";
|
public static final String CIRCULAR_ALBUM_ART = "circular_album_art";
|
||||||
public static final String USER_NAME = "user_name";
|
public static final String USER_NAME = "user_name";
|
||||||
|
public static final String USER_BIO = "user_bio";
|
||||||
public static final String TOGGLE_FULL_SCREEN = "toggle_full_screen";
|
public static final String TOGGLE_FULL_SCREEN = "toggle_full_screen";
|
||||||
public static final String TOGGLE_VOLUME = "toggle_volume";
|
public static final String TOGGLE_VOLUME = "toggle_volume";
|
||||||
public static final String TOGGLE_TAB_TITLES = "toggle_tab_titles";
|
public static final String TOGGLE_TAB_TITLES = "toggle_tab_titles";
|
||||||
|
@ -154,6 +156,14 @@ public final class PreferenceUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUserBio() {
|
||||||
|
return mPreferences.getString(USER_BIO, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserBio(String bio) {
|
||||||
|
mPreferences.edit().putString(USER_BIO, bio).apply();
|
||||||
|
}
|
||||||
|
|
||||||
public int getFilterLength() {
|
public int getFilterLength() {
|
||||||
return mPreferences.getInt(FILTER_SONG, 20);
|
return mPreferences.getInt(FILTER_SONG, 20);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,95 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2019 Hemanth Savarala.
|
|
||||||
*
|
|
||||||
* Licensed under the GNU General Public License v3
|
|
||||||
*
|
|
||||||
* This is free software: you can redistribute it and/or modify it under
|
|
||||||
* the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
||||||
* See the GNU General Public License for more details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package code.name.monkey.retromusic.views;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.ColorStateList;
|
|
||||||
import android.content.res.TypedArray;
|
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.util.AttributeSet;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
|
||||||
|
|
||||||
import com.google.android.material.card.MaterialCardView;
|
|
||||||
|
|
||||||
import androidx.annotation.ColorInt;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.transition.AutoTransition;
|
|
||||||
import androidx.transition.TransitionManager;
|
|
||||||
import code.name.monkey.appthemehelper.util.ColorUtil;
|
|
||||||
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
|
||||||
import code.name.monkey.retromusic.R;
|
|
||||||
|
|
||||||
public class CollapsingFAB extends FrameLayout {
|
|
||||||
@ColorInt
|
|
||||||
int color = Color.WHITE;
|
|
||||||
|
|
||||||
String title;
|
|
||||||
Drawable icon;
|
|
||||||
|
|
||||||
boolean showTitle;
|
|
||||||
|
|
||||||
ImageView shuffleIcon;
|
|
||||||
TextView textView;
|
|
||||||
MaterialCardView cardView;
|
|
||||||
|
|
||||||
public CollapsingFAB(@NonNull Context context) {
|
|
||||||
this(context, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CollapsingFAB(@NonNull Context context, @Nullable AttributeSet attrs) {
|
|
||||||
this(context, attrs, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public CollapsingFAB(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
|
||||||
super(context, attrs, defStyleAttr);
|
|
||||||
TypedArray attributes = getContext().obtainStyledAttributes(attrs, R.styleable.CollapsingFAB, 0, 0);
|
|
||||||
icon = attributes.getDrawable(R.styleable.CollapsingFAB_setIcon);
|
|
||||||
color = attributes.getColor(R.styleable.CollapsingFAB_shuffleBackgroundColor, 0);
|
|
||||||
showTitle = attributes.getBoolean(R.styleable.CollapsingFAB_showTitle, false);
|
|
||||||
title = attributes.getString(R.styleable.CollapsingFAB_setText);
|
|
||||||
|
|
||||||
View view = inflate(context, R.layout.collapsing_floating_action_button, this);
|
|
||||||
shuffleIcon = view.findViewById(R.id.icon);
|
|
||||||
shuffleIcon.setImageDrawable(icon);
|
|
||||||
|
|
||||||
textView = view.findViewById(R.id.shuffle_text);
|
|
||||||
textView.setText(title);
|
|
||||||
textView.setVisibility(showTitle ? VISIBLE : GONE);
|
|
||||||
cardView = view.findViewById(R.id.container);
|
|
||||||
attributes.recycle();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setShowTitle(boolean showTitle) {
|
|
||||||
this.showTitle = showTitle;
|
|
||||||
TransitionManager.beginDelayedTransition(this, new AutoTransition());
|
|
||||||
textView.setVisibility(showTitle ? VISIBLE : GONE);
|
|
||||||
invalidate();
|
|
||||||
requestLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setColor(int color) {
|
|
||||||
this.color = color;
|
|
||||||
int textColor = MaterialValueHelper.INSTANCE.getPrimaryTextColor(getContext(), ColorUtil.INSTANCE.isColorLight(color));
|
|
||||||
shuffleIcon.setColorFilter(textColor);
|
|
||||||
textView.setTextColor(textColor);
|
|
||||||
cardView.setCardBackgroundColor(ColorStateList.valueOf(color));
|
|
||||||
postInvalidate();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.views;
|
||||||
|
|
||||||
|
import android.annotation.TargetApi;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.os.Build;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.webkit.WebView;
|
||||||
|
|
||||||
|
public class LollipopFixedWebView extends WebView {
|
||||||
|
public LollipopFixedWebView(Context context) {
|
||||||
|
super(getFixedContext(context));
|
||||||
|
}
|
||||||
|
|
||||||
|
public LollipopFixedWebView(Context context, AttributeSet attrs) {
|
||||||
|
super(getFixedContext(context), attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||||
|
super(getFixedContext(context), attrs, defStyleAttr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||||
|
public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||||
|
super(getFixedContext(context), attrs, defStyleAttr, defStyleRes);
|
||||||
|
}
|
||||||
|
|
||||||
|
public LollipopFixedWebView(Context context, AttributeSet attrs, int defStyleAttr, boolean privateBrowsing) {
|
||||||
|
super(getFixedContext(context), attrs, defStyleAttr, privateBrowsing);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Context getFixedContext(Context context) {
|
||||||
|
return context.createConfigurationContext(new Configuration());
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,6 +18,9 @@ import android.content.Context;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.glide.GlideApp;
|
import code.name.monkey.retromusic.glide.GlideApp;
|
||||||
|
|
||||||
|
@ -26,26 +29,26 @@ import code.name.monkey.retromusic.glide.GlideApp;
|
||||||
*/
|
*/
|
||||||
public class NetworkImageView extends CircularImageView {
|
public class NetworkImageView extends CircularImageView {
|
||||||
|
|
||||||
public NetworkImageView(Context context) {
|
public NetworkImageView(@NonNull Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
init(context, null);
|
init(context, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkImageView(Context context, AttributeSet attrs) {
|
public NetworkImageView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
init(context, attrs);
|
init(context, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public NetworkImageView(Context context, AttributeSet attrs, int defStyleAttr) {
|
public NetworkImageView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
super(context, attrs, defStyleAttr);
|
super(context, attrs, defStyleAttr);
|
||||||
init(context, attrs);
|
init(context, attrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImageUrl(String imageUrl) {
|
public void setImageUrl(@NonNull String imageUrl) {
|
||||||
setImageUrl(getContext(), imageUrl);
|
setImageUrl(getContext(), imageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setImageUrl(Context context, String imageUrl) {
|
public void setImageUrl(@NonNull Context context, @NonNull String imageUrl) {
|
||||||
GlideApp.with(context)
|
GlideApp.with(context)
|
||||||
.load(imageUrl)
|
.load(imageUrl)
|
||||||
.error(R.drawable.ic_person_flat)
|
.error(R.drawable.ic_person_flat)
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.retromusic.views;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore;
|
||||||
|
import code.name.monkey.appthemehelper.util.ATHUtil;
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil;
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper;
|
||||||
|
import code.name.monkey.retromusic.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by hemanths on 3/23/19
|
||||||
|
*/
|
||||||
|
public class OptionMenuItemView extends FrameLayout {
|
||||||
|
|
||||||
|
public OptionMenuItemView(@NonNull Context context) {
|
||||||
|
this(context, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OptionMenuItemView(@NonNull Context context, @Nullable AttributeSet attrs) {
|
||||||
|
this(context, attrs, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OptionMenuItemView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
|
||||||
|
this(context, attrs, defStyleAttr, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OptionMenuItemView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
|
||||||
|
super(context, attrs, defStyleAttr, defStyleRes);
|
||||||
|
inflate(context, R.layout.item_option_menu, this);
|
||||||
|
|
||||||
|
setBackgroundTintList(ColorStateList.valueOf(ThemeStore.Companion.accentColor(context)));
|
||||||
|
|
||||||
|
TextView textView = findViewById(R.id.title);
|
||||||
|
textView.setTextColor(MaterialValueHelper.INSTANCE.getPrimaryTextColor(context, ColorUtil.INSTANCE.isColorLight(ThemeStore.Companion.primaryColor(context))));
|
||||||
|
IconImageView iconImageView = findViewById(R.id.icon);
|
||||||
|
|
||||||
|
TypedArray attributes = context.obtainStyledAttributes(attrs, R.styleable.OptionMenuItemView, 0, 0);
|
||||||
|
|
||||||
|
String title = attributes.getString(R.styleable.OptionMenuItemView_optionTitle);
|
||||||
|
textView.setText(title);
|
||||||
|
|
||||||
|
Drawable icon = attributes.getDrawable(R.styleable.OptionMenuItemView_optionIcon);
|
||||||
|
iconImageView.setImageDrawable(icon);
|
||||||
|
|
||||||
|
attributes.recycle();
|
||||||
|
}
|
||||||
|
}
|
17
app/src/main/res/drawable/bg_fab.xml
Normal file
17
app/src/main/res/drawable/bg_fab.xml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
~
|
||||||
|
~ Licensed under the GNU General Public License v3
|
||||||
|
~
|
||||||
|
~ This is free software: you can redistribute it and/or modify it under
|
||||||
|
~ the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
~ See the GNU General Public License for more details.
|
||||||
|
-->
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="@color/md_red_A400" />
|
||||||
|
<corners android:radius="56dp" />
|
||||||
|
</shape>
|
|
@ -4,9 +4,7 @@
|
||||||
android:height="24dp"
|
android:height="24dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24">
|
android:viewportHeight="24">
|
||||||
|
|
||||||
|
|
||||||
<path
|
<path
|
||||||
android:fillColor="@color/md_white_1000"
|
android:fillColor="@color/md_white_1000"
|
||||||
android:pathData="M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1 0.9 2 2 2h8c1.1 0 2-0.9 2-2V7z" />
|
android:pathData="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" />
|
||||||
</vector>
|
</vector>
|
23
app/src/main/res/drawable/ic_grid_size_white_24dp.xml
Normal file
23
app/src/main/res/drawable/ic_grid_size_white_24dp.xml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
~
|
||||||
|
~ Licensed under the GNU General Public License v3
|
||||||
|
~
|
||||||
|
~ This is free software: you can redistribute it and/or modify it under
|
||||||
|
~ the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
~ See the GNU General Public License for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="@color/md_white_1000"
|
||||||
|
android:pathData="M4,2H20A2,2 0 0,1 22,4V20A2,2 0 0,1 20,22H4C2.92,22 2,21.1 2,20V4A2,2 0 0,1 4,2M4,4V11H11V4H4M4,20H11V13H4V20M20,20V13H13V20H20M20,4H13V11H20V4Z" />
|
||||||
|
</vector>
|
|
@ -98,16 +98,15 @@
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="true"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute">
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/bannerTitle"
|
android:id="@+id/bannerTitle"
|
||||||
style="@style/BigTitleTextAppearance"
|
style="@style/BigTitleTextAppearance"
|
||||||
|
@ -36,13 +35,10 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<FrameLayout
|
<code.name.monkey.retromusic.views.HeightFitSquareLayout
|
||||||
android:id="@+id/imageContainer"
|
android:id="@+id/imageContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:layout_weight="1"
|
|
||||||
app:layout_collapseMode="parallax"
|
|
||||||
app:layout_collapseParallaxMultiplier="0.5">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/editorImage"
|
android:id="@+id/editorImage"
|
||||||
|
@ -60,7 +56,7 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</FrameLayout>
|
</code.name.monkey.retromusic.views.HeightFitSquareLayout>
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
android:id="@+id/content"
|
android:id="@+id/content"
|
||||||
|
@ -76,21 +72,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/albumTitleContainer"
|
android:id="@+id/albumTitleContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -100,9 +89,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/album"
|
android:hint="@string/album"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -110,14 +97,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -127,9 +107,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/album_artist"
|
android:hint="@string/album_artist"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -137,14 +115,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -154,9 +125,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/genre"
|
android:hint="@string/genre"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -164,14 +133,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -181,9 +143,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/year"
|
android:hint="@string/year"
|
||||||
android:inputType="text|number"
|
android:inputType="text|number"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -191,13 +151,14 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/saveFab"
|
android:id="@+id/saveTags"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
app:setIcon="@drawable/ic_save_white_24dp"
|
android:layout_margin="16dp"
|
||||||
app:setText="Save"
|
android:gravity="center"
|
||||||
app:showTitle="true"
|
android:text="@string/save"
|
||||||
app:shuffleBackgroundColor="@color/md_grey_200" />
|
app:icon="@drawable/ic_save_white_24dp"
|
||||||
|
app:iconGravity="textStart" />
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -96,15 +96,12 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong" />
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="true"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -123,16 +123,14 @@
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="false"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|
|
@ -95,14 +95,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="false"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -130,15 +130,13 @@
|
||||||
android:layout_height="72dp"
|
android:layout_height="72dp"
|
||||||
android:background="@drawable/shadow_down_strong" />
|
android:background="@drawable/shadow_down_strong" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="false"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -97,14 +97,12 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="false"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -26,10 +26,10 @@
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_marginEnd="128dp"
|
|
||||||
android:layout_marginStart="128dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="128dp"
|
||||||
|
android:layout_marginEnd="128dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||||
|
|
||||||
|
@ -100,21 +100,18 @@
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/nameContainer"
|
android:id="@+id/nameContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_marginStart="16dp"
|
||||||
app:boxBackgroundMode="outline"
|
android:layout_marginTop="8dp"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="@color/md_grey_700"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -122,7 +119,27 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/my_name"
|
android:hint="@string/my_name"
|
||||||
android:inputType="textPersonName|textCapWords|text"
|
android:inputType="textPersonName|textCapWords|text"
|
||||||
android:padding="16dp"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/bioContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:boxBackgroundMode="filled"
|
||||||
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/bio"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="@string/bio"
|
||||||
|
android:inputType="textPersonName|textCapWords|text"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -136,9 +137,4 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="12dp"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -114,16 +114,12 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="true"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -42,6 +42,10 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="72dp"
|
||||||
|
android:background="@drawable/shadow_down_strong" />
|
||||||
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
</code.name.monkey.retromusic.views.WidthFitSquareLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -93,21 +97,14 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="8dp">
|
android:padding="16dp">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/albumTitleContainer"
|
android:id="@+id/albumTitleContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -117,8 +114,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/album"
|
android:hint="@string/album"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -126,14 +122,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -143,8 +132,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/album_artist"
|
android:hint="@string/album_artist"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -152,14 +140,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -169,8 +150,7 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/genre"
|
android:hint="@string/genre"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -178,14 +158,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -195,21 +168,20 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/year"
|
android:hint="@string/year"
|
||||||
android:inputType="text|number"
|
android:inputType="text|number"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/saveFab"
|
android:id="@+id/saveTags"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal|bottom"
|
android:layout_gravity="bottom"
|
||||||
app:setIcon="@drawable/ic_save_white_24dp"
|
android:layout_margin="16dp"
|
||||||
app:setText="Save"
|
android:gravity="center"
|
||||||
app:showTitle="true"
|
android:text="@string/save"
|
||||||
app:shuffleBackgroundColor="@color/md_grey_200" />
|
app:icon="@drawable/ic_save_white_24dp"
|
||||||
|
app:iconGravity="textStart" />
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -98,14 +98,13 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffleAll"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom|end"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="16dp"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:text="@string/action_shuffle_all"
|
||||||
app:setText="@string/action_shuffle_all"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:showTitle="true"
|
|
||||||
app:shuffleBackgroundColor="@color/md_black_1000" />
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -68,14 +68,14 @@
|
||||||
android:textColor="?android:textColorSecondary"
|
android:textColor="?android:textColorSecondary"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/clearQueue"
|
android:id="@+id/clearQueue"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
app:setIcon="@drawable/ic_clear_all_black_24dp"
|
android:layout_margin="16dp"
|
||||||
app:showTitle="true"
|
android:text="@string/clear_playing_queue"
|
||||||
app:setText="@string/clear_playing_queue"
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
app:shuffleBackgroundColor="@color/md_deep_purple_A700" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -91,14 +91,13 @@
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/actionShuffle"
|
android:id="@+id/actionShuffleAll"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
app:setIcon="@drawable/ic_shuffle_white_24dp"
|
android:layout_margin="16dp"
|
||||||
app:setText="@string/action_shuffle_all"
|
android:text="@string/action_shuffle_all"
|
||||||
app:showTitle="true" />
|
app:icon="@drawable/ic_clear_all_black_24dp" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -72,25 +72,16 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="outline"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/songText"
|
android:id="@+id/songText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/song"
|
android:hint="@string/song"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:padding="14dp" />
|
tools:text="@string/song" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
@ -98,39 +89,24 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEEditText
|
<code.name.monkey.appthemehelper.common.views.ATEEditText
|
||||||
android:id="@+id/albumText"
|
android:id="@+id/albumText"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@null"
|
|
||||||
android:hint="@string/album"
|
android:hint="@string/album"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/artistContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -141,23 +117,16 @@
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/artist"
|
android:hint="@string/artist"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/albumArtistContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
@ -169,23 +138,16 @@
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/album_artist"
|
android:hint="@string/album_artist"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/composerContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
@ -196,8 +158,7 @@
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/composer"
|
android:hint="@string/composer"
|
||||||
android:inputType="text|textCapWords"
|
android:inputType="text|textCapWords"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -208,18 +169,12 @@
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/genreContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
@ -228,29 +183,21 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="sans-serif"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/genre"
|
android:hint="@string/genre"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/yearContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
@ -259,28 +206,20 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:fontFamily="sans-serif"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/year"
|
android:hint="@string/year"
|
||||||
android:inputType="text|number"
|
android:inputType="text|number"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/trackNumberContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
app:boxBackgroundMode="outline"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
@ -292,24 +231,16 @@
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/track_hint"
|
android:hint="@string/track_hint"
|
||||||
android:inputType="text|number"
|
android:inputType="text|number"
|
||||||
android:maxLines="1"
|
android:maxLines="1" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/lyricsContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:layout_weight="1"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxBackgroundMode="outline"
|
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="?android:attr/textColorPrimary"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,8 +251,7 @@
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:hint="@string/lyrics"
|
android:hint="@string/lyrics"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine" />
|
||||||
android:padding="16dp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
@ -330,15 +260,16 @@
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CollapsingFAB
|
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
android:id="@+id/saveFab"
|
android:id="@+id/saveTags"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="end|bottom"
|
android:layout_gravity="bottom"
|
||||||
app:setIcon="@drawable/ic_save_white_24dp"
|
android:layout_margin="16dp"
|
||||||
app:setText="Save"
|
android:gravity="center"
|
||||||
app:showTitle="true"
|
android:text="@string/save"
|
||||||
app:shuffleBackgroundColor="@color/md_grey_200" />
|
app:icon="@drawable/ic_save_white_24dp"
|
||||||
|
app:iconGravity="textStart" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
|
|
|
@ -39,7 +39,8 @@
|
||||||
<com.google.android.material.card.MaterialCardView
|
<com.google.android.material.card.MaterialCardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:cardCornerRadius="8dp"
|
android:layout_margin="12dp"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
app:cardUseCompatPadding="true">
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
|
@ -102,17 +103,12 @@
|
||||||
android:id="@+id/nameContainer"
|
android:id="@+id/nameContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="12dp"
|
android:layout_marginStart="16dp"
|
||||||
app:boxBackgroundMode="outline"
|
android:layout_marginEnd="16dp"
|
||||||
app:boxCollapsedPaddingTop="16dp"
|
app:boxBackgroundMode="filled"
|
||||||
app:boxCornerRadiusBottomEnd="8dp"
|
|
||||||
app:boxCornerRadiusBottomStart="8dp"
|
|
||||||
app:boxCornerRadiusTopEnd="8dp"
|
|
||||||
app:boxCornerRadiusTopStart="8dp"
|
|
||||||
app:boxStrokeColor="@color/md_grey_700"
|
|
||||||
app:boxStrokeWidth="1dp"
|
|
||||||
app:hintEnabled="true">
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/name"
|
android:id="@+id/name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -120,7 +116,27 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:hint="@string/my_name"
|
android:hint="@string/my_name"
|
||||||
android:inputType="textPersonName|textCapWords|text"
|
android:inputType="textPersonName|textCapWords|text"
|
||||||
android:padding="16dp"
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/bioContainer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
app:boxBackgroundMode="filled"
|
||||||
|
app:hintEnabled="true">
|
||||||
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/bio"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="@string/bio"
|
||||||
|
android:inputType="textPersonName|textCapWords|text"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<WebView
|
<code.name.monkey.retromusic.views.LollipopFixedWebView
|
||||||
android:id="@+id/webView"
|
android:id="@+id/webView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1,10 +1,18 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
|
||||||
style="@style/SubTitleTextAppearance"
|
style="@style/SubTitleTextAppearance"
|
||||||
android:text="@string/credit_title" />
|
android:text="@string/credit_title" />
|
||||||
|
|
||||||
|
@ -26,3 +34,4 @@
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
|
@ -1,22 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.card.MaterialCardView 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"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
|
||||||
style="@style/SubTitleTextAppearance"
|
style="@style/SubTitleTextAppearance"
|
||||||
android:text="@string/others" />
|
android:text="@string/others" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/changelog"
|
android:id="@+id/changelog"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -104,4 +105,4 @@
|
||||||
android:text="0.0.0" />
|
android:text="0.0.0" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</com.google.android.material.card.MaterialCardView>
|
|
@ -1,21 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.card.MaterialCardView 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_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
|
||||||
style="@style/SubTitleTextAppearance"
|
style="@style/SubTitleTextAppearance"
|
||||||
android:text="@string/support_development" />
|
android:text="@string/support_development" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/appGithub"
|
android:id="@+id/appGithub"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -273,6 +274,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
|
@ -1,21 +1,22 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<com.google.android.material.card.MaterialCardView 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_height="wrap_content"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEAccentTextView
|
||||||
style="@style/SubTitleTextAppearance"
|
style="@style/SubTitleTextAppearance"
|
||||||
android:text="@string/social" />
|
android:text="@string/social" />
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/pinterestLink"
|
android:id="@+id/pinterestLink"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -45,16 +46,16 @@
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/pinterest_page"
|
android:text="@string/pinterest_page" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:text="@string/pinterest_page_summary" />
|
android:text="@string/pinterest_page_summary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -88,16 +89,16 @@
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/instagram_page"
|
android:text="@string/instagram_page" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:text="@string/instagram_page_summary" />
|
android:text="@string/instagram_page_summary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -130,16 +131,16 @@
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/twitter_page"
|
android:text="@string/twitter_page" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:text="@string/twitter_page_summary" />
|
android:text="@string/twitter_page_summary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -172,15 +173,15 @@
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/discord_page"
|
android:text="@string/discord_page" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1"/>
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
android:text="@string/discord_summary" />
|
android:text="@string/discord_summary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -214,15 +215,15 @@
|
||||||
android:paddingBottom="8dp">
|
android:paddingBottom="8dp">
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/telegram_group"
|
android:text="@string/telegram_group" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
android:text="@string/telegram_group_summary" />
|
android:text="@string/telegram_group_summary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -258,19 +259,18 @@
|
||||||
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/google_plus"
|
android:text="@string/google_plus" />
|
||||||
style="@style/TextAppearance.MaterialComponents.Subtitle1" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
style="@style/TextAppearance.MaterialComponents.Body2"
|
|
||||||
android:alpha="0.85"
|
android:alpha="0.85"
|
||||||
android:text="@string/google_plus_community" />
|
android:text="@string/google_plus_community" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</LinearLayout>
|
|
|
@ -4,8 +4,8 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
app:cardCornerRadius="26dp"
|
app:cardCornerRadius="26dp"
|
||||||
app:cardUseCompatPadding="true"
|
app:cardUseCompatPadding="true"
|
||||||
tools:backgroundTint="@color/md_red_400">
|
tools:backgroundTint="@color/md_red_400">
|
||||||
|
@ -26,6 +26,7 @@
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/shuffle_text"
|
android:id="@+id/shuffle_text"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Button"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
|
33
app/src/main/res/layout/fab_collapsed.xml
Normal file
33
app/src/main/res/layout/fab_collapsed.xml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
~
|
||||||
|
~ Licensed under the GNU General Public License v3
|
||||||
|
~
|
||||||
|
~ This is free software: you can redistribute it and/or modify it under
|
||||||
|
~ the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
~ See the GNU General Public License for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/extend_fab_container"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_fab"
|
||||||
|
android:elevation="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/fab"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
app:cornerRadius="56dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
33
app/src/main/res/layout/fab_extended.xml
Normal file
33
app/src/main/res/layout/fab_extended.xml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
~
|
||||||
|
~ Licensed under the GNU General Public License v3
|
||||||
|
~
|
||||||
|
~ This is free software: you can redistribute it and/or modify it under
|
||||||
|
~ the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
~ See the GNU General Public License for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/extend_fab_container"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/bg_fab"
|
||||||
|
android:elevation="8dp">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/fab"
|
||||||
|
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:cornerRadius="56dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -108,6 +108,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nestedScrollingEnabled="false" />
|
android:nestedScrollingEnabled="false" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
|
@ -114,5 +114,42 @@
|
||||||
app:srcCompat="@drawable/default_artist_art" />
|
app:srcCompat="@drawable/default_artist_art" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/player_lyrics"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:alpha="0"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:elevation="20dp"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_lyrics_line1"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:shadowColor="@color/md_black_1000"
|
||||||
|
android:shadowRadius="4"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/md_white_1000"
|
||||||
|
android:textSize="22sp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/player_lyrics_line2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:shadowColor="@color/md_black_1000"
|
||||||
|
android:shadowRadius="4"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/md_white_1000"
|
||||||
|
android:textSize="22sp" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
|
@ -34,19 +34,18 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_scrollFlags="scroll|enterAlways">
|
app:layout_scrollFlags="scroll|enterAlways">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
style="@style/Toolbar"
|
style="@style/Toolbar"
|
||||||
android:layout_gravity="center_vertical"
|
android:layout_gravity="center_vertical"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:layout_collapseMode="pin"
|
app:layout_collapseMode="pin"
|
||||||
tools:ignore="UnusedAttribute">
|
tools:ignore="UnusedAttribute" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/bannerTitle"
|
|
||||||
style="@style/BigTitleTextAppearanceToolbar"
|
|
||||||
android:text="@string/app_name"
|
|
||||||
tools:ignore="MissingPrefix" />
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/userImage"
|
android:id="@+id/userImage"
|
||||||
|
@ -56,7 +55,13 @@
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
app:civ_border="false" />
|
app:civ_border="false" />
|
||||||
</androidx.appcompat.widget.Toolbar>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/bannerTitle"
|
||||||
|
style="@style/BigTitleTextAppearanceToolbar"
|
||||||
|
android:text="@string/app_name"
|
||||||
|
tools:ignore="MissingPrefix" />
|
||||||
|
|
||||||
<ViewStub
|
<ViewStub
|
||||||
android:id="@+id/cab_stub"
|
android:id="@+id/cab_stub"
|
||||||
|
|
|
@ -5,22 +5,20 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp"
|
|
||||||
tools:ignore="MissingPrefix">
|
tools:ignore="MissingPrefix">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/userInfoContainer"
|
android:id="@+id/userInfoContainer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
android:padding="16dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal">
|
||||||
android:paddingTop="16dp"
|
|
||||||
android:paddingBottom="16dp">
|
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.CircularImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/userImage"
|
android:id="@+id/userImage"
|
||||||
android:layout_width="38dp"
|
android:layout_width="42dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="42dp"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
app:civ_border="false" />
|
app:civ_border="false" />
|
||||||
|
|
||||||
|
@ -36,7 +34,9 @@
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/titleWelcome"
|
android:id="@+id/titleWelcome"
|
||||||
style="@style/SubTitleTextAppearance"
|
android:layout_width="wrap_content"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:padding="0dp" />
|
android:padding="0dp" />
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
|
@ -109,47 +109,73 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionFolders"
|
android:id="@+id/actionFolders"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/folders"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_folder_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_folder_white_24dp"
|
||||||
|
app:optionTitle="@string/folders" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionEqualizer"
|
android:id="@+id/actionEqualizer"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/equalizer"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_equalizer_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_equalizer_white_24dp"
|
||||||
|
app:optionTitle="@string/equalizer" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionSleepTimer"
|
android:id="@+id/actionSleepTimer"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/action_sleep_timer"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_timer_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_timer_white_24dp"
|
||||||
|
app:optionTitle="@string/action_sleep_timer" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionShare"
|
android:id="@+id/actionShare"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/action_share"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_share_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_share_white_24dp"
|
||||||
|
app:optionTitle="@string/action_share" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionBugReport"
|
android:id="@+id/actionBugReport"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/report_bug"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_bug_report_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_bug_report_white_24dp"
|
||||||
|
app:optionTitle="@string/report_bug" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionAbout"
|
android:id="@+id/actionAbout"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/action_about"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_help_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_help_white_24dp"
|
||||||
|
app:optionTitle="@string/action_about" />
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.MaterialButtonTextColor
|
<code.name.monkey.retromusic.views.OptionMenuItemView
|
||||||
android:id="@+id/actionRate"
|
android:id="@+id/actionRate"
|
||||||
style="@style/OptionButtonsStyle"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/rate_app"
|
android:layout_height="wrap_content"
|
||||||
app:icon="@drawable/ic_star_white_24dp" />
|
android:background="?rectSelector"
|
||||||
|
android:clickable="true"
|
||||||
|
android:focusable="true"
|
||||||
|
app:optionIcon="@drawable/ic_star_white_24dp"
|
||||||
|
app:optionTitle="@string/rate_app" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -12,8 +12,6 @@
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/progress_slider_height"
|
android:layout_height="@dimen/progress_slider_height"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/progress_slider_height"
|
android:layout_height="@dimen/progress_slider_height"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:paddingStart="12dp"
|
android:paddingStart="12dp"
|
||||||
android:paddingEnd="12dp">
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:layout_weight="0">
|
android:layout_weight="0">
|
||||||
|
|
||||||
<androidx.appcompat.widget.Toolbar
|
<androidx.appcompat.widget.Toolbar
|
||||||
|
|
|
@ -7,5 +7,4 @@
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
|
@ -9,10 +9,10 @@
|
||||||
tools:ignore="MissingPrefix">
|
tools:ignore="MissingPrefix">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:paddingEnd="12dp"
|
|
||||||
android:paddingStart="12dp"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="28dp">
|
android:layout_height="28dp"
|
||||||
|
android:paddingStart="12dp"
|
||||||
|
android:paddingEnd="12dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/songCurrentProgress"
|
android:id="@+id/songCurrentProgress"
|
||||||
|
@ -61,8 +61,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0"
|
android:layout_weight="0"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical">
|
||||||
android:padding="8dp">
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
@ -88,7 +87,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_marginTop="4dp"
|
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
|
|
|
@ -12,12 +12,13 @@
|
||||||
android:paddingEnd="12dp"
|
android:paddingEnd="12dp"
|
||||||
tools:ignore="PrivateResource">
|
tools:ignore="PrivateResource">
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.NetworkImageView
|
<code.name.monkey.retromusic.views.CircularImageView
|
||||||
android:id="@+id/image"
|
android:id="@+id/image"
|
||||||
android:layout_width="40dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="40dp"
|
||||||
app:civ_border="false"
|
app:civ_border="false"
|
||||||
app:civ_shadow="false" />
|
app:civ_shadow="false"
|
||||||
|
app:srcCompat="@drawable/ic_person_flat" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -30,12 +31,13 @@
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATEPrimaryTextView
|
||||||
android:id="@+id/title"
|
android:id="@+id/title"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content" />
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
|
|
||||||
|
|
||||||
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
<code.name.monkey.appthemehelper.common.views.ATESecondaryTextView
|
||||||
android:id="@+id/text"
|
android:id="@+id/text"
|
||||||
|
style="@style/TextAppearance.MaterialComponents.Body2"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:alpha="0.85" />
|
android:alpha="0.85" />
|
||||||
|
|
42
app/src/main/res/layout/item_option_menu.xml
Normal file
42
app/src/main/res/layout/item_option_menu.xml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
|
~ Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
~
|
||||||
|
~ Licensed under the GNU General Public License v3
|
||||||
|
~
|
||||||
|
~ This is free software: you can redistribute it and/or modify it under
|
||||||
|
~ the terms of the GNU General Public License as published by
|
||||||
|
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
~
|
||||||
|
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
~ See the GNU General Public License for more details.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="0dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<code.name.monkey.retromusic.views.IconImageView
|
||||||
|
android:id="@+id/icon"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="0"
|
||||||
|
android:padding="14dp"
|
||||||
|
app:srcCompat="@drawable/ic_folder_white_24dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/folders"
|
||||||
|
android:textSize="16sp" />
|
||||||
|
</LinearLayout>
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingBottom="12dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -38,10 +39,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nestedScrollingEnabled="false"
|
android:nestedScrollingEnabled="false"
|
||||||
app:itemMargin="28dp" />
|
app:itemMargin="28dp" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -40,9 +40,4 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:nestedScrollingEnabled="false" />
|
android:nestedScrollingEnabled="false" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:background="?attr/dividerColor" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:id="@+id/mainContent"
|
android:id="@+id/mainContent"
|
||||||
|
@ -11,10 +11,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="bottom"
|
android:gravity="bottom"
|
||||||
sothree:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
sothree:layout_constraintEnd_toEndOf="parent"
|
|
||||||
sothree:layout_constraintStart_toStartOf="parent"
|
|
||||||
sothree:layout_constraintTop_toTopOf="parent"
|
|
||||||
sothree:umanoOverlay="false"
|
sothree:umanoOverlay="false"
|
||||||
sothree:umanoPanelHeight="0dp"
|
sothree:umanoPanelHeight="0dp"
|
||||||
sothree:umanoScrollableView="@+id/recycler_view"
|
sothree:umanoScrollableView="@+id/recycler_view"
|
||||||
|
@ -49,7 +45,7 @@
|
||||||
|
|
||||||
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
<code.name.monkey.retromusic.views.BottomNavigationBarTinted
|
||||||
android:id="@+id/bottomNavigationView"
|
android:id="@+id/bottomNavigationView"
|
||||||
android:layout_width="0dp"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
@ -59,8 +55,6 @@
|
||||||
app:itemTextAppearanceInactive="@style/BottomSheetTextAppearance"
|
app:itemTextAppearanceInactive="@style/BottomSheetTextAppearance"
|
||||||
app:itemTextColor="@drawable/bottom_navigation_item_colors"
|
app:itemTextColor="@drawable/bottom_navigation_item_colors"
|
||||||
app:labelVisibilityMode="labeled"
|
app:labelVisibilityMode="labeled"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/slidingLayout"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/slidingLayout"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:menu="@menu/bottom_navigation_main" />
|
app:menu="@menu/bottom_navigation_main" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -3,15 +3,11 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
tools:context=".DrawerActivity">
|
tools:context=".DrawerActivity">
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_shuffle_all"
|
|
||||||
android:icon="@drawable/ic_shuffle_white_24dp"
|
|
||||||
android:title="@string/action_shuffle_all"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_grid_size"
|
android:id="@+id/action_grid_size"
|
||||||
android:title="@string/action_grid_size">
|
android:icon="@drawable/ic_grid_size_white_24dp"
|
||||||
|
android:title="@string/action_grid_size"
|
||||||
|
app:showAsAction="ifRoom">
|
||||||
<menu>
|
<menu>
|
||||||
<group
|
<group
|
||||||
android:id="@+id/group_grid_size"
|
android:id="@+id/group_grid_size"
|
||||||
|
@ -47,25 +43,9 @@
|
||||||
|
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_sort_order"
|
android:id="@+id/action_sort_order"
|
||||||
android:title="@string/action_sort_order">
|
android:icon="@drawable/ic_sort_white_24dp"
|
||||||
|
android:title="@string/action_sort_order"
|
||||||
|
app:showAsAction="ifRoom">
|
||||||
<menu></menu>
|
<menu></menu>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_sleep_timer"
|
|
||||||
android:orderInCategory="98"
|
|
||||||
android:title="@string/action_sleep_timer"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_equalizer"
|
|
||||||
android:orderInCategory="99"
|
|
||||||
android:title="@string/equalizer"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
|
|
||||||
<item
|
|
||||||
android:id="@+id/action_settings"
|
|
||||||
android:orderInCategory="100"
|
|
||||||
android:title="@string/action_settings"
|
|
||||||
app:showAsAction="never" />
|
|
||||||
</menu>
|
</menu>
|
|
@ -1,11 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<declare-styleable name="CollapsingFAB">
|
|
||||||
<attr name="shuffleBackgroundColor" format="color" />
|
|
||||||
<attr name="showTitle" format="boolean" />
|
|
||||||
<attr name="setIcon" format="reference" />
|
|
||||||
<attr name="setText" format="string" />
|
|
||||||
</declare-styleable>
|
|
||||||
<attr name="roundSelector" format="reference" />
|
<attr name="roundSelector" format="reference" />
|
||||||
<attr name="rectSelector" format="reference" />
|
<attr name="rectSelector" format="reference" />
|
||||||
<attr name="rectSelectorStrong" format="reference" />
|
<attr name="rectSelectorStrong" format="reference" />
|
||||||
|
@ -58,4 +53,9 @@
|
||||||
<attr name="iconBackgroundColor" format="color" />
|
<attr name="iconBackgroundColor" format="color" />
|
||||||
<attr name="icon" format="reference" />
|
<attr name="icon" format="reference" />
|
||||||
</declare-styleable>
|
</declare-styleable>
|
||||||
|
|
||||||
|
<declare-styleable name="OptionMenuItemView">
|
||||||
|
<attr name="optionTitle" format="reference" />
|
||||||
|
<attr name="optionIcon" format="reference" />
|
||||||
|
</declare-styleable>
|
||||||
</resources>
|
</resources>
|
|
@ -59,5 +59,6 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
|
||||||
<dimen name="horizontal_margin">0dp</dimen>
|
<dimen name="horizontal_margin">0dp</dimen>
|
||||||
<dimen name="bottom_sheet_width">0dp</dimen>
|
<dimen name="bottom_sheet_width">0dp</dimen>
|
||||||
<dimen name="mini_player_height_expanded">104dp</dimen>
|
<dimen name="mini_player_height_expanded">104dp</dimen>
|
||||||
<dimen name="progress_slider_height">28dp</dimen>
|
<dimen name="progress_slider_height">30dp</dimen>
|
||||||
|
<dimen name="triple_and_half_margin">56dp</dimen>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -603,5 +603,8 @@
|
||||||
<string name="next_song">Next Song</string>
|
<string name="next_song">Next Song</string>
|
||||||
<string name="last_song">Last song</string>
|
<string name="last_song">Last song</string>
|
||||||
<string name="slide">Slide</string>
|
<string name="slide">Slide</string>
|
||||||
|
<string name="save">Save</string>
|
||||||
|
<string name="pick_image_intent_text">Pick image</string>
|
||||||
|
<string name="set_photo">Set a profile photo</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -28,9 +28,9 @@ android {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
|
||||||
implementation 'com.google.android.material:material:1.0.0'
|
implementation 'com.google.android.material:material:1.1.0-alpha04'
|
||||||
implementation 'androidx.preference:preference:1.0.0'
|
implementation 'androidx.preference:preference:1.1.0-alpha04'
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
// Used for the list preference classes
|
// Used for the list preference classes
|
||||||
implementation "com.afollestad.material-dialogs:core:$materialDialog"
|
implementation "com.afollestad.material-dialogs:core:$materialDialog"
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.appthemehelper.common.views
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.util.AttributeSet
|
||||||
|
|
||||||
|
import androidx.appcompat.widget.AppCompatTextView
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
|
||||||
|
class ATEAccentTextView : AppCompatTextView {
|
||||||
|
constructor(context: Context) : super(context) {
|
||||||
|
init(context, null)
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
|
||||||
|
init(context, attrs)
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int) : super(context, attrs, defStyleAttr) {
|
||||||
|
init(context, attrs)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun init(context: Context, attrs: AttributeSet?) {
|
||||||
|
setTextColor(ThemeStore.accentColor(context))
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 Hemanth Savarala.
|
||||||
|
*
|
||||||
|
* Licensed under the GNU General Public License v3
|
||||||
|
*
|
||||||
|
* This is free software: you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the GNU General Public License for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package code.name.monkey.appthemehelper.common.views
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import code.name.monkey.appthemehelper.ThemeStore
|
||||||
|
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||||
|
import code.name.monkey.appthemehelper.util.MaterialValueHelper
|
||||||
|
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
|
||||||
|
|
||||||
|
class ATEExtendedFloatingActionButton @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = -1) : ExtendedFloatingActionButton(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
backgroundTintList = ColorStateList.valueOf(ThemeStore.accentColor(context))
|
||||||
|
setTextColor(ColorStateList.valueOf(MaterialValueHelper.getPrimaryTextColor(context, ColorUtil.isColorLight(ThemeStore.accentColor(context)))))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue