Activity中加入以下代码(kotlin)
val paint = Paint()
val colorMatrix = ColorMatrix()
colorMatrix.setSaturation(0f)
paint.colorFilter = ColorMatrixColorFilter(colorMatrix)
window.decorView.setLayerType(View.LAYER_TYPE_HARDWARE, paint)
via:鸿洋
Activity中加入以下代码(kotlin)
val paint = Paint()
val colorMatrix = ColorMatrix()
colorMatrix.setSaturation(0f)
paint.colorFilter = ColorMatrixColorFilter(colorMatrix)
window.decorView.setLayerType(View.LAYER_TYPE_HARDWARE, paint)
via:鸿洋