To set a bitmap with a resource

Asked 2 years ago, Updated 2 years ago, 76 views

bm = BitmapFactory.decodeResource(null, R.id.image); Is this how I set the bitmap in the resource?

android bitmap

2022-09-22 22:20

1 Answers

Bitmap bm = BitmapFactory.decodeResource(getResources(), R.drawable.image); You have to do it like this.


2022-09-22 22:20

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.