开发者

Does createScaledBitmap() use px or dp?

When specifying the width and height of your scaled Bitmap, i开发者_如何学运维s the method asking for pixels or density-independent pixels?

I have a 240dp device and when scaling an image to 240x240, the image is barely half the screen size. I was expecting it to be full screen. Does this mean the method uses pixels?


Yes, it uses px. You can obtain the size of the screen, and call createScaledBitmap(screenWidth ... )

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜