Fix ambient mode on android wear

This commit is contained in:
Lucas Lima 2020-12-31 19:05:39 -03:00 committed by Lucas Nunes
parent 2fde05b9e9
commit 2671c74bf4
2 changed files with 5 additions and 4 deletions

View file

@ -30,8 +30,8 @@ fun Area.paintOnCanvas(
style = Paint.Style.STROKE
strokeWidth = 2.0f
isAntiAlias = !isLowBitAmbient
color = theme.palette.border
alpha = 0xff
color = 0xFFFFFF
alpha = 0x66
}
} else {
painter.apply {
@ -156,7 +156,8 @@ fun Area.paintOnCanvas(
}
}
isAntiAlias = !isAmbientMode
alpha = 0xff
style = Paint.Style.FILL
alpha = 0xFF
}
canvas.drawText(minesAround.toString(), paintSettings, painter)
}

View file

@ -24,7 +24,6 @@ import kotlinx.coroutines.launch
import org.koin.androidx.viewmodel.ext.android.viewModel
class WatchGameActivity : AppCompatActivity(R.layout.activity_level), AmbientModeSupport.AmbientCallbackProvider {
private val viewModel by viewModel<GameViewModel>()
private var currentLevelFragment: WatchLevelFragment? = null
@ -63,6 +62,7 @@ class WatchGameActivity : AppCompatActivity(R.layout.activity_level), AmbientMod
bindViewModel()
loadGameFragment()
viewModel.startNewGame(Difficulty.Intermediate)
swipe.isSwipeable = false
}