Wear CWF SuppressLint
This commit is contained in:
parent
c1d9cff4b5
commit
a42c6a7aea
|
@ -53,7 +53,7 @@ import org.joda.time.TimeOfDay
|
|||
import org.json.JSONObject
|
||||
import java.io.ByteArrayOutputStream
|
||||
import javax.inject.Inject
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
class CustomWatchface : BaseWatchFace() {
|
||||
|
||||
@Inject lateinit var context: Context
|
||||
|
@ -88,7 +88,6 @@ class CustomWatchface : BaseWatchFace() {
|
|||
.build()
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
override fun setDataFields() {
|
||||
super.setDataFields()
|
||||
binding.direction2.setImageDrawable(TrendArrowMap.drawable(singleBg.slopeArrow, resources, resDataMap))
|
||||
|
@ -141,7 +140,6 @@ class CustomWatchface : BaseWatchFace() {
|
|||
binding.secondHand.visibility = (binding.secondHand.visibility == View.VISIBLE && showSecond).toVisibility()
|
||||
}
|
||||
|
||||
@SuppressLint("UseCompatLoadingForDrawables")
|
||||
private fun setWatchfaceStyle() {
|
||||
val customWatchface = persistence.readCustomWatchface() ?: persistence.readCustomWatchface(true)
|
||||
customWatchface?.let {
|
||||
|
@ -514,7 +512,6 @@ class CustomWatchface : BaseWatchFace() {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private enum class TrendArrowMap(val symbol: String, @DrawableRes val icon: Int, val customDrawable: ResFileMap?) {
|
||||
NONE("??", R.drawable.ic_invalid, ResFileMap.ARROW_NONE),
|
||||
|
@ -538,6 +535,7 @@ private enum class TrendArrowMap(val symbol: String, @DrawableRes val icon: Int,
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("RtlHardcoded")
|
||||
private enum class GravityMap(val key: String, val gravity: Int) {
|
||||
CENTER(JsonKeyValues.CENTER.key, Gravity.CENTER),
|
||||
LEFT(JsonKeyValues.LEFT.key, Gravity.LEFT),
|
||||
|
@ -615,5 +613,6 @@ private enum class PrefMap(val key: String, @StringRes val prefKey: Int) {
|
|||
SHOW_LOOP_STATUS(CwfMetadataKey.CWF_PREF_WATCH_SHOW_LOOP_STATUS.key, R.string.key_show_external_status),
|
||||
SHOW_WEEK_NUMBER(CwfMetadataKey.CWF_PREF_WATCH_SHOW_WEEK_NUMBER.key, R.string.key_show_week_number)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue