To set a bitmap with a resource

Asked 1 years ago, Updated 1 years ago, 68 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.