diff --git a/app/build.gradle b/app/build.gradle index 48845442..fa363ecb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { vectorDrawables.useSupportLibrary = true applicationId "code.name.monkey.retromusic" - versionCode 315 + versionCode 319 versionName '3.1.400' multiDexEnabled true @@ -155,7 +155,7 @@ dependencies { implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1' implementation 'com.r0adkll:slidableactivity:2.0.6' /*Backend all*/ - implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.3-kmod' + implementation 'com.github.kabouzeid:AndroidSlidingUpPanel:3.3.0-kmod3' implementation 'com.github.AdrienPoupa:jaudiotagger:2.2.3' implementation 'org.nanohttpd:nanohttpd:2.3.1' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index 7d94643a..fe159323 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file +

v3.1.400

v3.1.300

v3.1.240

v3.1.200

v3.0.570

If you see entire app white or dark or black select same theme in settings to fix

FAQ's

*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.

\ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt b/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt index 58b51e39..958cef48 100644 --- a/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt +++ b/app/src/main/java/code/name/monkey/retromusic/preferences/MaterialListPreference.kt @@ -27,7 +27,7 @@ import com.afollestad.materialdialogs.list.listItemsSingleChoice class MaterialListPreference : ListPreference { - private val mLayoutRes = code.name.monkey.retromusic.R.layout.ate_preference_list + private val mLayoutRes = R.layout.ate_preference_list constructor(context: Context) : super(context) diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.kt index c5238588..82c37e7d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/LyricsActivity.kt @@ -3,10 +3,12 @@ package code.name.monkey.retromusic.ui.activities import android.annotation.SuppressLint import android.content.res.ColorStateList import android.os.AsyncTask +import android.os.Build import android.os.Bundle import android.text.InputType import android.text.TextUtils import android.view.* +import androidx.annotation.StringRes import androidx.core.content.ContextCompat import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager @@ -39,6 +41,7 @@ import kotlinx.android.synthetic.main.fragment_synced.* import org.jaudiotagger.tag.FieldKey import java.io.File import java.util.* +import kotlin.collections.ArrayList class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPager.OnPageChangeListener { override fun onPageScrollStateChanged(state: Int) { @@ -209,26 +212,28 @@ class LyricsActivity : AbsMusicServiceActivity(), View.OnClickListener, ViewPage } class PagerAdapter(fm: FragmentManager) : FragmentStatePagerAdapter(fm) { - override fun getItem(position: Int): Fragment { - return when (position) { - 0 -> SyncedLyricsFragment() - 1 -> OfflineLyricsFragment() - else -> SyncedLyricsFragment() + class Tabs(@StringRes val title: Int, + val fragment: Fragment) + + private var tabs = ArrayList() + + init { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP_MR1) { + tabs.add(Tabs(R.string.synced_lyrics, SyncedLyricsFragment())) } + tabs.add(Tabs(R.string.normal_lyrics, OfflineLyricsFragment())) + } + + override fun getItem(position: Int): Fragment { + return tabs[position].fragment } override fun getPageTitle(position: Int): CharSequence? { - return when (position) { - 0 -> App.context.getString(R.string.synced_lyrics) - 1 -> App.context.getString(R.string.normal_lyrics) - else -> { - App.context.getString(R.string.synced_lyrics) - } - } + return App.context.getString(tabs[position].title) } override fun getCount(): Int { - return 2 + return tabs.size } } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.kt b/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.kt index fecca802..47efefc6 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/activities/MainActivity.kt @@ -4,7 +4,6 @@ import android.annotation.SuppressLint import android.content.* import android.content.pm.PackageManager import android.os.Bundle -import android.preference.PreferenceManager import android.provider.MediaStore import android.util.Log import android.view.MenuItem @@ -25,8 +24,6 @@ import code.name.monkey.retromusic.ui.fragments.mainactivity.LibraryFragment import code.name.monkey.retromusic.ui.fragments.mainactivity.home.BannerHomeFragment import code.name.monkey.retromusic.util.NavigationUtil import code.name.monkey.retromusic.util.PreferenceUtil -import com.afollestad.materialdialogs.MaterialDialog -import com.afollestad.materialdialogs.callbacks.onDismiss import io.reactivex.disposables.CompositeDisposable import java.util.* @@ -282,6 +279,9 @@ class MainActivity : AbsSlidingMusicPanelActivity(), SharedPreferences.OnSharedP R.id.action_playlist, R.id.action_song -> setCurrentFragment(LibraryFragment.newInstance(itemId), false) R.id.action_home -> setCurrentFragment(BannerHomeFragment.newInstance(), false) + else -> { + setCurrentFragment(BannerHomeFragment.newInstance(), false) + } } } diff --git a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt index 58cc287e..ff5fae17 100644 --- a/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/ui/fragments/settings/ThemeSettingsFragment.kt @@ -92,14 +92,14 @@ class ThemeSettingsFragment : AbsSettingsFragment() { accentColorPref.setOnPreferenceClickListener { MaterialDialog(activity!!).show { - title(code.name.monkey.retromusic.R.string.accent_color) + title(R.string.accent_color) positiveButton(R.string.set) colorChooser(colors = ACCENT_COLORS, allowCustomArgb = true, subColors = ACCENT_COLORS_SUB) { _, color -> - var colorFinal = Color.BLACK; + /*var colorFinal = Color.BLACK; if (!ColorUtil.isColorSaturated(color)) { - colorFinal = color; - } - ThemeStore.editTheme(context).accentColor(colorFinal).commit() + colorFinal = color + }*/ + ThemeStore.editTheme(context).accentColor(color).commit() if (VersionUtils.hasNougatMR()) DynamicShortcutManager(context).updateDynamicShortcuts() activity!!.recreate() diff --git a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java index 0163668b..d00ebb04 100644 --- a/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java +++ b/app/src/main/java/code/name/monkey/retromusic/util/PreferenceUtil.java @@ -265,7 +265,7 @@ public final class PreferenceUtil { public final int getLastPage() { - return mPreferences.getInt(LAST_PAGE, R.id.action_song); + return mPreferences.getInt(LAST_PAGE, R.id.action_home); } public void setLastPage(final int value) { diff --git a/app/src/main/res/layout-land/fragment_home.xml b/app/src/main/res/layout-land/fragment_home.xml index 8fa9ba3d..cb288f7d 100644 --- a/app/src/main/res/layout-land/fragment_home.xml +++ b/app/src/main/res/layout-land/fragment_home.xml @@ -22,6 +22,7 @@ @@ -47,6 +48,7 @@ android:layout_marginEnd="16dp" app:civ_border="false" /> + + app:showAsAction="ifRoom">