simplify :android-wear-shared:shared
This commit is contained in:
parent
8acb13ee37
commit
b7bc33c1d8
|
@ -1,3 +0,0 @@
|
||||||
<resources>
|
|
||||||
<bool name="isTablet">true</bool>
|
|
||||||
</resources>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<resources>
|
|
||||||
<bool name="isTablet">false</bool>
|
|
||||||
</resources>
|
|
|
@ -50,7 +50,7 @@ class TherapyEventDataPoint(
|
||||||
}
|
}
|
||||||
override val paintStyle: Paint.Style = Paint.Style.FILL // not used
|
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 {
|
override fun color(context: Context?): Int {
|
||||||
return when (data.type) {
|
return when (data.type) {
|
||||||
TherapyEvent.Type.ANNOUNCEMENT -> rh.gac(context, info.nightscout.core.ui.R.attr.notificationAnnouncement)
|
TherapyEvent.Type.ANNOUNCEMENT -> rh.gac(context, info.nightscout.core.ui.R.attr.notificationAnnouncement)
|
||||||
|
|
|
@ -93,7 +93,7 @@ class ResourceHelperImpl @Inject constructor(var context: Context, private val f
|
||||||
return (dp * scale + 0.5f).toInt()
|
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 =
|
override fun gac(context: Context?, attributeId: Int): Int =
|
||||||
(ContextThemeWrapper(context ?: this.context, info.nightscout.core.ui.R.style.AppTheme)).getThemeColor(attributeId)
|
(ContextThemeWrapper(context ?: this.context, info.nightscout.core.ui.R.style.AppTheme)).getThemeColor(attributeId)
|
||||||
|
|
|
@ -190,7 +190,7 @@ class OverviewFragment : DaggerFragment(), View.OnClickListener, OnLongClickList
|
||||||
smallHeight = screenHeight <= Constants.SMALL_HEIGHT
|
smallHeight = screenHeight <= Constants.SMALL_HEIGHT
|
||||||
val landscape = screenHeight < screenWidth
|
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.nsclientCard.visibility = config.NSCLIENT.toVisibility()
|
||||||
|
|
||||||
binding.notifications.setHasFixedSize(false)
|
binding.notifications.setHasFixedSize(false)
|
||||||
|
|
Loading…
Reference in a new issue