simplify :android-wear-shared:shared

This commit is contained in:
Milos Kozak 2023-09-18 18:50:00 +02:00
parent 8acb13ee37
commit b7bc33c1d8
5 changed files with 3 additions and 9 deletions

View file

@ -1,3 +0,0 @@
<resources>
<bool name="isTablet">true</bool>
</resources>

View file

@ -1,3 +0,0 @@
<resources>
<bool name="isTablet">false</bool>
</resources>

View file

@ -50,7 +50,7 @@ class TherapyEventDataPoint(
}
override val paintStyle: Paint.Style = Paint.Style.FILL // not used
override val size get() = if (rh.gb(info.nightscout.shared.R.bool.isTablet)) 12.0f else 10.0f
override val size get() = if (rh.gb(info.nightscout.core.ui.R.bool.isTablet)) 12.0f else 10.0f
override fun color(context: Context?): Int {
return when (data.type) {
TherapyEvent.Type.ANNOUNCEMENT -> rh.gac(context, info.nightscout.core.ui.R.attr.notificationAnnouncement)

View file

@ -93,7 +93,7 @@ class ResourceHelperImpl @Inject constructor(var context: Context, private val f
return (dp * scale + 0.5f).toInt()
}
override fun shortTextMode(): Boolean = !gb(info.nightscout.shared.R.bool.isTablet)
override fun shortTextMode(): Boolean = !gb(info.nightscout.core.ui.R.bool.isTablet)
override fun gac(context: Context?, attributeId: Int): Int =
(ContextThemeWrapper(context ?: this.context, info.nightscout.core.ui.R.style.AppTheme)).getThemeColor(attributeId)

View file

@ -190,7 +190,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
smallHeight = screenHeight <= Constants.SMALL_HEIGHT
val landscape = screenHeight < screenWidth
skinProvider.activeSkin().preProcessLandscapeOverviewLayout(binding, landscape, rh.gb(info.nightscout.shared.R.bool.isTablet), smallHeight)
skinProvider.activeSkin().preProcessLandscapeOverviewLayout(binding, landscape, rh.gb(info.nightscout.core.ui.R.bool.isTablet), smallHeight)
binding.nsclientCard.visibility = config.NSCLIENT.toVisibility()
binding.notifications.setHasFixedSize(false)