I have a transparent black and white image. I would like to apply specific color (say red) to the black portion of the image and leave white portion of the image as it is. How do i achieve this with Android mobile?
Thanks
I have a transparent black and white image. I would like to apply specific color (say red) to the black portion of the image and leave white portion of the image as it is. How do i achieve this with Android mobile?
Thanks
Setting the color filter of imageview to LightingColorFilter (Color.White, Color.Red) provide the expected result.
If you have your pic on some view / layout. You can achieve your goal by changing, setting background color on the view / layout under your image. (on the view under half transparent image).
Example
yourViewUnderPic = findViewById(R.id.yourLayoutID);
yourViewUnderPic.setBackgroundColor(Color.parseColor("#006400"));