Just black is pro
This commit is contained in:
parent
6e6e02ea89
commit
a4e1e23491
4 changed files with 46 additions and 1 deletions
|
@ -63,7 +63,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
aboutSettings.setOnClickListener(this)
|
||||
|
||||
buyProContainer.apply {
|
||||
if (App.isProVersion()) show() else hide()
|
||||
if (!App.isProVersion()) show() else hide()
|
||||
setOnClickListener {
|
||||
NavigationUtil.goToProVersion(requireContext())
|
||||
}
|
||||
|
@ -75,6 +75,7 @@ class MainSettingsFragment : Fragment(), View.OnClickListener {
|
|||
buyPremium.setTextColor(it)
|
||||
diamondIcon.imageTintList = ColorStateList.valueOf(it)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun inflateFragment(fragment: Fragment, @StringRes title: Int) {
|
||||
|
|
|
@ -25,6 +25,7 @@ import code.name.monkey.appthemehelper.common.prefs.supportv7.ATEColorPreference
|
|||
import code.name.monkey.appthemehelper.common.prefs.supportv7.ATESwitchPreference
|
||||
import code.name.monkey.appthemehelper.util.ColorUtil
|
||||
import code.name.monkey.appthemehelper.util.VersionUtils
|
||||
import code.name.monkey.retromusic.App
|
||||
import code.name.monkey.retromusic.R
|
||||
import code.name.monkey.retromusic.appshortcuts.DynamicShortcutManager
|
||||
import code.name.monkey.retromusic.util.PreferenceUtil
|
||||
|
@ -77,6 +78,10 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
|
|||
}
|
||||
val blackTheme: ATESwitchPreference? = findPreference("black_theme")
|
||||
blackTheme?.setOnPreferenceChangeListener { _, _ ->
|
||||
if (!App.isProVersion()) {
|
||||
showProToastAndNavigate("Just Black theme")
|
||||
return@setOnPreferenceChangeListener false
|
||||
}
|
||||
ThemeStore.markChanged(requireContext())
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
|
||||
requireActivity().setTheme(PreferenceUtil.getThemeResFromPrefValue("black"))
|
||||
|
|
19
app/src/main/res/drawable/ic_invert_colors_white_24dp.xml
Normal file
19
app/src/main/res/drawable/ic_invert_colors_white_24dp.xml
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!--
|
||||
~ 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 android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M17.66,7.93L12,2.27 6.34,7.93c-3.12,3.12 -3.12,8.19 0,11.31C7.9,20.8 9.95,21.58 12,21.58c2.05,0 4.1,-0.78 5.66,-2.34 3.12,-3.12 3.12,-8.19 0,-11.31zM12,19.59c-1.6,0 -3.11,-0.62 -4.24,-1.76C6.62,16.69 6,15.19 6,13.59s0.62,-3.11 1.76,-4.24L12,5.1v14.49z"/>
|
||||
</vector>
|
|
@ -73,6 +73,26 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
app:srcCompat="@drawable/ic_invert_colors_white_24dp"
|
||||
app:tint="?colorOnSurface" />
|
||||
|
||||
<com.google.android.material.textview.MaterialTextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:text="@string/black_theme_name"
|
||||
android:textAppearance="@style/TextViewSubtitle1" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
|
|
Loading…
Reference in a new issue