1

I want a Black and white mode

Surface(color = MaterialTheme.colors.background,) {
     
    MainPage()//Text Image
 
    Canvas(modifier = Modifier.fillMaxSize()){
        drawRect(
            color = Color.White,
            blendMode = BlendMode.Saturation
        )
    }
}

but BlendMode Added in API level 29 BlendMode

what about 28- ? my test phone is API 26 android 8.0 , white screen

in android View

mGrayMatrix.setSaturation(0f)
mGrayPaint.colorFilter = ColorMatrixColorFilter(mGrayMatrix)
view.setLayerType(View.LAYER_TYPE_HARDWARE, mGrayPaint)

all view change

CompositionLocalProvider、Brush is too tedious

i need help

in details

starball
  • 20,030
  • 7
  • 43
  • 238
kakaxi-zh
  • 13
  • 3
  • ['Can somebody help me?' is not an actual question](https://meta.stackoverflow.com/a/284237/11107541). Can you pleaes ask an actual question? – starball Dec 30 '22 at 03:22
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Dec 30 '22 at 09:22

0 Answers0