apply the selected gravity at checklist items too

This commit is contained in:
tibbi
2019-12-08 20:16:51 +01:00
parent 0dc3f4d7f5
commit e7be99c528
4 changed files with 17 additions and 12 deletions

View File

@ -1,7 +1,9 @@
package com.simplemobiletools.notes.pro.helpers
import android.annotation.SuppressLint
import android.content.Context
import android.os.Environment
import android.view.Gravity
import com.simplemobiletools.commons.helpers.BaseConfig
class Config(context: Context) : BaseConfig(context) {
@ -80,4 +82,11 @@ class Config(context: Context) : BaseConfig(context) {
var moveUndoneChecklistItems: Boolean
get() = prefs.getBoolean(MOVE_UNDONE_CHECKLIST_ITEMS, false)
set(moveUndoneChecklistItems) = prefs.edit().putBoolean(MOVE_UNDONE_CHECKLIST_ITEMS, moveUndoneChecklistItems).apply()
@SuppressLint("RtlHardcoded")
fun getTextGravity() = when (gravity) {
GRAVITY_CENTER -> Gravity.CENTER_HORIZONTAL
GRAVITY_RIGHT -> Gravity.RIGHT
else -> Gravity.LEFT
}
}