Added notification icon

This commit is contained in:
h4h13 2020-04-21 23:28:06 +05:30
parent 642f566f9f
commit 232fa51ea8
7 changed files with 22 additions and 10 deletions

View file

@ -54,9 +54,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
requireActivity().setTheme(PreferenceUtil.getThemeResFromPrefValue(theme)) requireActivity().setTheme(PreferenceUtil.getThemeResFromPrefValue(theme))
DynamicShortcutManager(requireContext()).updateDynamicShortcuts() DynamicShortcutManager(requireContext()).updateDynamicShortcuts()
} }
Handler().postDelayed({ requireActivity().recreate()
requireActivity().recreate()
}, 400)
true true
} }
} }
@ -96,9 +94,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
requireActivity().setTheme(PreferenceUtil.getThemeResFromPrefValue("black")) requireActivity().setTheme(PreferenceUtil.getThemeResFromPrefValue("black"))
DynamicShortcutManager(requireContext()).updateDynamicShortcuts() DynamicShortcutManager(requireContext()).updateDynamicShortcuts()
} }
Handler().postDelayed({ requireActivity().recreate()
requireActivity().recreate()
}, 400)
true true
} }
@ -109,9 +105,7 @@ class ThemeSettingsFragment : AbsSettingsFragment() {
ThemeStore.prefs(requireContext()).edit().putBoolean("desaturated_color", desaturated) ThemeStore.prefs(requireContext()).edit().putBoolean("desaturated_color", desaturated)
.apply() .apply()
PreferenceUtil.getInstance(requireContext()).setDesaturatedColor(desaturated) PreferenceUtil.getInstance(requireContext()).setDesaturatedColor(desaturated)
Handler().postDelayed({ requireActivity().recreate()
requireActivity().recreate()
}, 400)
true true
} }

View file

@ -37,6 +37,7 @@ import androidx.annotation.ColorInt
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat import androidx.core.content.res.ResourcesCompat
import androidx.core.view.ViewCompat import androidx.core.view.ViewCompat
import code.name.monkey.retromusic.BuildConfig
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import java.util.* import java.util.*
@ -71,8 +72,10 @@ class LrcView @JvmOverloads constructor(
private var mCurrentPlayLineColor: Int = 0 private var mCurrentPlayLineColor: Int = 0
private var mNoLrcTextSize: Float = 0.toFloat() private var mNoLrcTextSize: Float = 0.toFloat()
private var mNoLrcTextColor: Int = 0 private var mNoLrcTextColor: Int = 0
//是否拖拽中否的话响应onClick事件 //是否拖拽中否的话响应onClick事件
private var isDragging: Boolean = false private var isDragging: Boolean = false
//用户开始操作 //用户开始操作
private var isUserScroll: Boolean = false private var isUserScroll: Boolean = false
private var isAutoAdjustPosition = true private var isAutoAdjustPosition = true
@ -213,7 +216,9 @@ class LrcView @JvmOverloads constructor(
isAntiAlias = true isAntiAlias = true
textAlign = Paint.Align.LEFT textAlign = Paint.Align.LEFT
textSize = mLrcTextSize textSize = mLrcTextSize
typeface = ResourcesCompat.getFont(context, R.font.circular) /* if (BuildConfig.FLAVOR != "nofont") {
typeface = ResourcesCompat.getFont(context, R.font.circular)
}*/
} }
mDefaultContent = DEFAULT_CONTENT mDefaultContent = DEFAULT_CONTENT

View file

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="26.086956"
android:viewportHeight="26.086956"
android:tint="#FFFFFF">
<group android:translateX="1.0434783"
android:translateY="1.0434783">
<path
android:fillColor="#FF000000"
android:pathData="M12,5v8.55c-0.94,-0.54 -2.1,-0.75 -3.33,-0.32 -1.34,0.48 -2.37,1.67 -2.61,3.07 -0.46,2.74 1.86,5.08 4.59,4.65 1.96,-0.31 3.35,-2.11 3.35,-4.1V7h2c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2h-2c-1.1,0 -2,0.9 -2,2z"/>
</group>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 486 B