mirror of
https://github.com/LittleTurtle2333/SimplicityTools.git
synced 2026-07-14 12:21:18 +08:00
壁纸缩放功能
This commit is contained in:
@@ -4,7 +4,7 @@ import com.lt2333.simplicitytools.BuildConfig
|
||||
import de.robv.android.xposed.XSharedPreferences
|
||||
|
||||
object XSPUtils {
|
||||
var prefs = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
|
||||
private var prefs = XSharedPreferences(BuildConfig.APPLICATION_ID, "config")
|
||||
|
||||
fun getBoolean(key: String, defValue: Boolean): Boolean {
|
||||
if (prefs.hasFileChanged()) {
|
||||
@@ -18,6 +18,13 @@ object XSPUtils {
|
||||
}
|
||||
return prefs.getInt(key, defValue)
|
||||
}
|
||||
|
||||
fun getFloat(key: String, defValue: Float): Float {
|
||||
if (prefs.hasFileChanged()) {
|
||||
prefs.reload()
|
||||
}
|
||||
return prefs.getFloat(key, defValue)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun hasEnable(key: String, default: Boolean = false, noinline extraCondition: (() -> Boolean)? = null, crossinline block: () -> Unit) {
|
||||
|
||||
Reference in New Issue
Block a user