Fix ringtone, file sharing

main
h4h13 2019-04-05 11:19:40 +05:30
parent c9811ca06b
commit fce012aaf3
20 changed files with 261 additions and 196 deletions

View File

@ -32,7 +32,7 @@ android {
vectorDrawables.useSupportLibrary = true
applicationId "code.name.monkey.retromusic"
versionCode 313
versionCode 314
versionName '3.1.400'
multiDexEnabled true
@ -130,7 +130,7 @@ dependencies {
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation "androidx.legacy:legacy-support-v13:1.0.0"
implementation "androidx.legacy:legacy-preference-v14:1.0.0"
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'com.google.android.material:material:1.1.0-alpha05'
implementation 'androidx.palette:palette-ktx:1.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

View File

@ -247,6 +247,8 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="com.android.vending.BILLING" />

View File

@ -1 +1 @@
<html> <head> <style type="text/css"> * { word-wrap: break-word; } {style-placeholder} a { color: #{link-color}; } a:active { color: #{link-color-active}; } ul { list-style-position: outside; padding-left: 0; padding-right: 0; margin-left: 1em; } li { padding-top: 8px; } </style> </head> <body> <h4>v3.1.400</h4> <ul> <li>Improved lock-screen behavior and UI</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> </ul> <h4>v3.1.300</h4> <ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <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>Improved some UI screens</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 composer error</li> <li>Bottom Options improved(internal)</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.400</h4> <ul> <li>Fix setting ringtone</li> <li>Fix file sharing crash</li> <li>Improved lock-screen behavior and UI</li> <li>Fix some crashes</li> <li>Fix playlist icon on small devices</li> <li>Fix empty lyrics text color</li> <li>Fix album cover background purple color in color theme</li> </ul> <h4>v3.1.300</h4> <ul> <li>Fix rename playlist text color</li> <li>Fix same album showing in details page</li> <li>Fix lyrics text alignment on sync and lyrics reading improved</li> <li>Improved home sections loading</li> <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>Improved some UI screens</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 composer error</li> <li>Bottom Options improved(internal)</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>

View File

@ -32,6 +32,7 @@ import code.name.monkey.retromusic.ui.activities.tageditor.AbsTagEditorActivity
import code.name.monkey.retromusic.ui.activities.tageditor.SongTagEditorActivity
import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.NavigationUtil
import code.name.monkey.retromusic.util.RingtoneManager
object SongMenuHelper {
@ -40,7 +41,11 @@ object SongMenuHelper {
fun handleMenuClick(activity: FragmentActivity, song: Song, menuItemId: Int): Boolean {
when (menuItemId) {
R.id.action_set_as_ringtone -> {
MusicUtil.setRingtone(activity, song.id)
if (RingtoneManager.requiresDialog(activity)) {
RingtoneManager.getDialog(activity)
}
val ringtoneManager = RingtoneManager(activity)
ringtoneManager.setRingtone(song)
return true
}
R.id.action_share -> {

View File

@ -76,7 +76,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsContrac
setupWindowTransition()
super.onCreate(savedInstanceState)
toggleBottomNavigationView(true)
collapsingToolbarLayout?.setBackgroundColor(ThemeStore.primaryColor(this))
setLightNavigationBar(true)
setNavigationbarColorAuto()

View File

@ -56,8 +56,8 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
override fun onPageSelected(position: Int) {
PreferenceUtil.getInstance().lyricsOptions = position
if (position == 0) fab.text = "Sync lyrics"
else if (position == 1) fab.text = "Lyrics"
if (position == 0) fab.text = getString(R.string.synced_lyrics)
else if (position == 1) fab.text = getString(R.string.lyrics)
}
override fun onClick(v: View?) {
@ -151,16 +151,23 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
}
MaterialDialog(this).show {
title(text = "Add lyrics")
neutralButton(text = "Search") { RetroUtil.openUrl(this@LyricsActivity, googleSearchLrcUrl) }
message(text = "Add time frame lyrics")
negativeButton(text = "Delete") { LyricUtil.deleteLrcFile(song.title, song.artistName) }
input(hint = "Paste lyrics here",
title(R.string.add_time_framed_lryics)
negativeButton(R.string.action_search) { RetroUtil.openUrl(this@LyricsActivity, googleSearchLrcUrl) }
input(hint = getString(R.string.paste_lyrics_here),
prefill = content,
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE) { _, input ->
LyricUtil.writeLrcToLoc(song.title, song.artistName, input.toString())
}
positiveButton(android.R.string.ok)
positiveButton(android.R.string.ok) {
updateSong()
}
}
}
private fun updateSong() {
val page = supportFragmentManager.findFragmentByTag("android:switcher:" + R.id.viewPager + ":" + viewPager.currentItem)
if (viewPager.currentItem == 0 && page != null) {
(page as BaseLyricsFragment).upDateSong()
}
}
@ -172,23 +179,24 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
}
MaterialDialog(this).show {
title(text = "Add lyrics")
neutralButton(text = "Search") { RetroUtil.openUrl(this@LyricsActivity, getGoogleSearchUrl()) }
negativeButton(text = "Delete") { LyricUtil.deleteLrcFile(song.title, song.artistName) }
input(hint = "Paste lyrics here",
title(R.string.add_lyrics)
negativeButton(R.string.action_search) { RetroUtil.openUrl(this@LyricsActivity, getGoogleSearchUrl()) }
input(hint = getString(R.string.paste_lyrics_here),
prefill = content,
inputType = InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_FLAG_MULTI_LINE) { _, input ->
val fieldKeyValueMap = EnumMap<FieldKey, String>(FieldKey::class.java)
fieldKeyValueMap[FieldKey.LYRICS] = input.toString()
WriteTagsAsyncTask(this@LyricsActivity).execute(WriteTagsAsyncTask.LoadingInfo(getSongPaths(song), fieldKeyValueMap, null))
}
positiveButton(android.R.string.ok)
positiveButton(android.R.string.ok) {
updateSong()
}
}
}
private fun getSongPaths(song: Song): ArrayList<String> {
val paths = ArrayList<String>(1)
paths.add(song.data!!)
paths.add(song.data)
return paths
}
@ -318,9 +326,11 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage
private fun setupLyricsView() {
lyricsView.apply {
val context = activity!!
setCurrentPlayLineColor(ThemeStore.accentColor(context))
setIndicatorTextColor(ThemeStore.accentColor(context))
setCurrentIndicateLineTextColor(ThemeStore.textColorPrimary(context))
setNoLrcTextColor(ThemeStore.textColorPrimary(context))
setOnPlayIndicatorLineListener(object : LrcView.OnPlayIndicatorLineListener {
override fun onPlay(time: Long, content: String) {
MusicPlayerRemote.seekTo(time.toInt())

View File

@ -119,7 +119,11 @@ abstract class AbsPlayerFragment : AbsMusicServiceFragment(), Toolbar.OnMenuItem
return true
}
R.id.action_set_as_ringtone -> {
MusicUtil.setRingtone(activity!!, song.id)
if (RingtoneManager.requiresDialog(activity!!)) {
RingtoneManager.getDialog(activity!!)
}
val ringtoneManager = RingtoneManager(activity!!)
ringtoneManager.setRingtone(song)
return true
}
R.id.action_settings -> {

View File

@ -54,12 +54,6 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
imageSettings.setOnClickListener(this)
notificationSettings.setOnClickListener(this)
otherSettings.setOnClickListener(this)
text.setTextColor(ThemeStore.textColorSecondary(context!!));
titleWelcome.setTextColor(ThemeStore.textColorPrimary(context!!));
titleWelcome.text = String.format("%s %s!", getTimeOfTheDay(), PreferenceUtil.getInstance().userName);
loadImageFromStorage();
userInfoContainer.setOnClickListener { NavigationUtil.goToUserInfo(activity!!) }
}
private fun inflateFragment(fragment: Fragment, @StringRes title: Int) {
@ -82,27 +76,4 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
}
return message
}
override fun onDestroyView() {
super.onDestroyView()
disposable.clear()
}
private val disposable = CompositeDisposable()
private fun loadImageFromStorage() {
disposable.add(Compressor(context!!)
.setMaxHeight(300)
.setMaxWidth(300)
.setQuality(75)
.setCompressFormat(Bitmap.CompressFormat.WEBP)
.compressToBitmapAsFlowable(
File(PreferenceUtil.getInstance().profileImage, USER_PROFILE))
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe({ userImage.setImageBitmap(it) }, {
userImage.setImageDrawable(ContextCompat.getDrawable(context!!, R.drawable.ic_person_flat))
}))
}
}

View File

@ -25,11 +25,14 @@ import android.net.Uri;
import android.os.Environment;
import android.provider.BaseColumns;
import android.provider.MediaStore;
import android.provider.Settings;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import org.jaudiotagger.audio.AudioFileIO;
import org.jaudiotagger.tag.FieldKey;
@ -40,9 +43,6 @@ import java.util.List;
import java.util.Locale;
import java.util.regex.Pattern;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.content.FileProvider;
import code.name.monkey.retromusic.R;
import code.name.monkey.retromusic.helper.MusicPlayerRemote;
import code.name.monkey.retromusic.loaders.PlaylistLoader;
@ -72,9 +72,9 @@ public class MusicUtil {
@NonNull
public static Intent createShareSongFileIntent(@NonNull final Song song, @NonNull Context context) {
Uri file = FileProvider.getUriForFile(context, context.getPackageName() + ".provider", new File(song.getData()));
try {
return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM,
FileProvider.getUriForFile(context, context.getApplicationContext().getPackageName(), new File(song.getData())))
return new Intent().setAction(Intent.ACTION_SEND).putExtra(Intent.EXTRA_STREAM, file)
.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
.setType("audio/*");
} catch (IllegalArgumentException e) {
@ -84,41 +84,6 @@ public class MusicUtil {
}
}
public static void setRingtone(@NonNull final Context context, final int id) {
final ContentResolver resolver = context.getContentResolver();
final Uri uri = getSongFileUri(id);
try {
final ContentValues values = new ContentValues(2);
values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, "1");
values.put(MediaStore.Audio.AudioColumns.IS_ALARM, "1");
resolver.update(uri, values, null, null);
} catch (@NonNull final UnsupportedOperationException ignored) {
return;
}
try {
Cursor cursor = resolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
new String[]{MediaStore.MediaColumns.TITLE},
BaseColumns._ID + "=?",
new String[]{String.valueOf(id)},
null);
try {
if (cursor != null && cursor.getCount() == 1) {
cursor.moveToFirst();
Settings.System.putString(resolver, Settings.System.RINGTONE, uri.toString());
final String message = context
.getString(R.string.x_has_been_set_as_ringtone, cursor.getString(0));
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
}
} finally {
if (cursor != null) {
cursor.close();
}
}
} catch (SecurityException ignored) {
}
}
@NonNull
public static String getSongInfoString(@NonNull Song song) {
return MusicUtil.buildInfoString(

View File

@ -0,0 +1,89 @@
/*
* 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.content.ContentValues
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.os.Build
import android.provider.BaseColumns
import android.provider.MediaStore
import android.provider.Settings
import android.widget.Toast
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil.getSongFileUri
import com.afollestad.materialdialogs.MaterialDialog
class RingtoneManager(val context: Context) {
fun setRingtone(song: Song) {
val resolver = context.contentResolver
val uri = getSongFileUri(song.id)
try {
val values = ContentValues(2)
values.put(MediaStore.Audio.AudioColumns.IS_RINGTONE, "1")
values.put(MediaStore.Audio.AudioColumns.IS_ALARM, "1")
resolver.update(uri, values, null, null)
} catch (ignored: UnsupportedOperationException) {
return
}
try {
val cursor = resolver.query(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI,
arrayOf(MediaStore.MediaColumns.TITLE),
BaseColumns._ID + "=?",
arrayOf(song.id.toString()), null)
cursor.use { cursorSong ->
if (cursorSong != null && cursorSong.count == 1) {
cursorSong.moveToFirst()
Settings.System.putString(resolver, Settings.System.RINGTONE, uri.toString())
val message = context
.getString(R.string.x_has_been_set_as_ringtone, cursorSong.getString(0))
Toast.makeText(context, message, Toast.LENGTH_SHORT).show()
}
}
} catch (ignored: SecurityException) {
}
}
companion object {
private const val TAG = "RingtoneManager"
fun requiresDialog(context: Context): Boolean {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.System.canWrite(context)) {
return true
}
}
return false
}
fun getDialog(context: Context): MaterialDialog {
return MaterialDialog(context).show {
title(R.string.dialog_title_set_ringtone)
message(R.string.dialog_message_set_ringtone)
positiveButton(android.R.string.ok) {
val intent = Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS)
intent.data = Uri.parse("package:" + context.applicationContext.packageName)
context.startActivity(intent)
}
negativeButton(android.R.string.cancel)
}
}
}
}

View File

@ -0,0 +1,24 @@
<?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="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM7.07 18.28c0.43-0.9 3.05-1.78 4.93-1.78s4.51 0.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-0.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93 0.59 -6.36 2.33C4.62 15.49 4 13.82 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-0.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-0.83 0-1.5-0.67-1.5-1.5S11.17 8 12 8s1.5 0.67 1.5 1.5S12.83 11 12 11z" />
</vector>

View File

@ -6,5 +6,8 @@
android:viewportHeight="24">
<path
android:fillColor="@color/md_white_1000"
android:pathData="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" />
android:pathData="M15 4V3H9v1H4v2h1v13c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2V6h1V4h-5zm2 15H7V6h10v13z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M9 8h2v9H9zm4 0h2v9h-2z" />
</vector>

View File

@ -7,5 +7,8 @@
<path
android:fillColor="@color/md_white_1000"
android:pathData="M19.43 12.98c0.04-0.32 0.07 -0.64 0.07 -0.98 0-0.34-0.03-0.66-0.07-0.98l2.11-1.65c0.19-0.15 0.24 -0.42 0.12 -0.64l-2-3.46c-0.09-0.16-0.26-0.25-0.44-0.25-0.06 0-0.12 0.01 -0.17 0.03 l-2.49 1c-0.52-0.4-1.08-0.73-1.69-0.98l-0.38-2.65C14.46 2.18 14.25 2 14 2h-4c-0.25 0-0.46 0.18 -0.49 0.42 l-0.38 2.65c-0.61 0.25 -1.17 0.59 -1.69 0.98 l-2.49-1c-0.06-0.02-0.12-0.03-0.18-0.03-0.17 0-0.34 0.09 -0.43 0.25 l-2 3.46c-0.13 0.22 -0.07 0.49 0.12 0.64 l2.11 1.65c-0.04 0.32 -0.07 0.65 -0.07 0.98 0 0.33 0.03 0.66 0.07 0.98l-2.11 1.65c-0.19 0.15 -0.24 0.42 -0.12 0.64 l2 3.46c0.09 0.16 0.26 0.25 0.44 0.25 0.06 0 0.12-0.01 0.17 -0.03l2.49-1c0.52 0.4 1.08 0.73 1.69 0.98 l0.38 2.65c0.03 0.24 0.24 0.42 0.49 0.42 h4c0.25 0 0.46-0.18 0.49 -0.42l0.38-2.65c0.61-0.25 1.17-0.59 1.69-0.98l2.49 1c0.06 0.02 0.12 0.03 0.18 0.03 0.17 0 0.34-0.09 0.43 -0.25l2-3.46c0.12-0.22 0.07 -0.49-0.12-0.64l-2.11-1.65zm-1.98-1.71c0.04 0.31 0.05 0.52 0.05 0.73 0 0.21-0.02 0.43 -0.05 0.73 l-0.14 1.13 0.89 0.7 1.08 0.84 -0.7 1.21-1.27-0.51-1.04-0.42-0.9 0.68 c-0.43 0.32 -0.84 0.56 -1.25 0.73 l-1.06 0.43 -0.16 1.13-0.2 1.35h-1.4l-0.19-1.35-0.16-1.13-1.06-0.43c-0.43-0.18-0.83-0.41-1.23-0.71l-0.91-0.7-1.06 0.43 -1.27 0.51 -0.7-1.21 1.08-0.84 0.89 -0.7-0.14-1.13c-0.03-0.31-0.05-0.54-0.05-0.74s0.02-0.43 0.05 -0.73l0.14-1.13-0.89-0.7-1.08-0.84 0.7 -1.21 1.27 0.51 1.04 0.42 0.9-0.68c0.43-0.32 0.84 -0.56 1.25-0.73l1.06-0.43 0.16 -1.13 0.2 -1.35h1.39l0.19 1.35 0.16 1.13 1.06 0.43 c0.43 0.18 0.83 0.41 1.23 0.71 l0.91 0.7 1.06-0.43 1.27-0.51 0.7 1.21-1.07 0.85 -0.89 0.7 0.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z" />
android:pathData="M13.85 22.25h-3.7c-0.74 0-1.36-0.54-1.45-1.27l-0.27-1.89c-0.27-0.14-0.53-0.29-0.79-0.46l-1.8 0.72 c-0.7 0.26 -1.47-0.03-1.81-0.65L2.2 15.53c-0.35-0.66-0.2-1.44 0.36 -1.88l1.53-1.19c-0.01-0.15-0.02-0.3-0.02-0.46 0-0.15 0.01 -0.31 0.02 -0.46l-1.52-1.19c-0.59-0.45-0.74-1.26-0.37-1.88l1.85-3.19c0.34-0.62 1.11-0.9 1.79-0.63l1.81 0.73 c0.26-0.17 0.52 -0.32 0.78 -0.46l0.27-1.91c0.09-0.7 0.71 -1.25 1.44-1.25h3.7c0.74 0 1.36 0.54 1.45 1.27l0.27 1.89c0.27 0.14 0.53 0.29 0.79 0.46 l1.8-0.72c0.71-0.26 1.48 0.03 1.82 0.65 l1.84 3.18c0.36 0.66 0.2 1.44-0.36 1.88l-1.52 1.19c0.01 0.15 0.02 0.3 0.02 0.46 s-0.01 0.31 -0.02 0.46 l1.52 1.19c0.56 0.45 0.72 1.23 0.37 1.86l-1.86 3.22c-0.34 0.62 -1.11 0.9 -1.8 0.63 l-1.8-0.72c-0.26 0.17 -0.52 0.32 -0.78 0.46 l-0.27 1.91c-0.1 0.68 -0.72 1.22-1.46 1.22zm-3.23-2h2.76l0.37-2.55 0.53 -0.22c0.44-0.18 0.88 -0.44 1.34-0.78l0.45-0.34 2.38 0.96 1.38-2.4-2.03-1.58 0.07 -0.56c0.03-0.26 0.06 -0.51 0.06 -0.78s-0.03-0.53-0.06-0.78l-0.07-0.56 2.03-1.58-1.39-2.4-2.39 0.96 -0.45-0.35c-0.42-0.32-0.87-0.58-1.33-0.77l-0.52-0.22-0.37-2.55h-2.76l-0.37 2.55-0.53 0.21 c-0.44 0.19 -0.88 0.44 -1.34 0.79 l-0.45 0.33 -2.38-0.95-1.39 2.39 2.03 1.58-0.07 0.56 a7 7 0 0 0-0.06 0.79 c0 0.26 0.02 0.53 0.06 0.78l0.07 0.56 -2.03 1.58 1.38 2.4 2.39-0.96 0.45 0.35c0.43 0.33 0.86 0.58 1.33 0.77 l0.53 0.22 0.38 2.55z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 12 8.5 C 13.9329966244 8.5 15.5 10.0670033756 15.5 12 C 15.5 13.9329966244 13.9329966244 15.5 12 15.5 C 10.0670033756 15.5 8.5 13.9329966244 8.5 12 C 8.5 10.0670033756 10.0670033756 8.5 12 8.5 Z" />
</vector>

View File

@ -4,39 +4,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:titleEnabled="false">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="">
<TextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearance"
android:text="@string/action_settings" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:id="@+id/background"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<FrameLayout
android:id="@+id/contentFrame"
@ -50,5 +22,29 @@
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
app:elevation="0dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="">
<TextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearance"
android:text="@string/action_settings" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -1,59 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:subtitleTextAppearance="@style/TextAppearance.MaterialComponents.Caption"
app:titleMargin="0dp"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Subtitle1" />
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
style="@style/TabLayoutStyle"
android:background="@android:color/transparent"
app:tabTextAppearance="@style/TabTextAppearance">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:navigationIcon="@drawable/ic_keyboard_arrow_down_black_24dp"
app:contentInsetLeft="0dp"
app:contentInsetStart="0dp"
app:contentInsetStartWithNavigation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
app:subtitleTextAppearance="@style/TextAppearance.AppCompat.Caption"
app:titleMargin="0dp"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.AppCompat.Subhead" />
android:text="@string/synced_lyrics" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tabs"
style="@style/TabLayoutStyle"
android:background="@android:color/transparent"
app:tabTextAppearance="@style/TabTextAppearance">
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/synced_lyrics" />
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/normal_lyrics" />
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</LinearLayout>
<com.google.android.material.tabs.TabItem
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/normal_lyrics" />
</com.google.android.material.tabs.TabLayout>
</com.google.android.material.appbar.AppBarLayout>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/fab"
@ -63,4 +57,4 @@
android:layout_margin="16dp"
android:text="@string/edit"
app:icon="@drawable/ic_edit_white_24dp" />
</FrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -4,6 +4,14 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/contentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
@ -11,34 +19,21 @@
android:elevation="0dp"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/collapsingToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:titleEnabled="false">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:layout_collapseMode="pin"
app:navigationIcon="@drawable/ic_keyboard_backspace_black_24dp"
app:title="">
<TextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearance"
android:text="@string/action_settings" />
<TextView
android:id="@+id/settingsTitle"
style="@style/BigTitleTextAppearance"
android:text="@string/action_settings" />
</androidx.appcompat.widget.Toolbar>
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
android:id="@+id/contentFrame"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -85,7 +85,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:behavior_overlapTop="24dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"

View File

@ -53,7 +53,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<LinearLayout
android:id="@+id/contentContainer"

View File

@ -460,8 +460,6 @@
<string name="support_development">Support development</string>
<string name="synced_lyrics">Synced lyrics</string>
<string name="system_equalizer">System Equalizer</string>
<!-- Message displayed when tag editing fails -->
@ -608,5 +606,11 @@
<string name="set_photo">Set a profile photo</string>
<string name="edit">Edit</string>
<string name="swipe_to_unlock">Swipe to unlock</string>
<string name="add_lyrics">Add lyrics</string>
<string name="paste_lyrics_here">Paste lyrics here</string>
<string name="add_time_framed_lryics">Add time frame lyrics</string>
<string name="synced_lyrics">Synced lyrics</string>
<string name="dialog_title_set_ringtone">Set ringtone</string>
<string name="dialog_message_set_ringtone">Allow Retro Music to modify audio settings</string>
</resources>

View File

@ -60,7 +60,7 @@
</style>
<style name="BigTitleTextAppearanceToolbar">
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Headline6
<item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Subtitle1
</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>