Android Bitmap.createBitmap returns negative mHeight
Posted
by
Hai Bi
on Stack Overflow
See other posts from Stack Overflow
or by Hai Bi
Published on 2012-10-16T04:59:10Z
Indexed on
2012/10/16
5:01 UTC
Read the original article
Hit count: 254
Modifying the Snake example. An exception was created from the bitmap class. So I debug the original Snake, and found that in TileView there is a function loadTile,
Bitmap bitmap = Bitmap.createBitmap(mTileSize, mTileSize, Bitmap.Config.ARGB_8888);
after the above assignment, the bitmap had -1 for mHeight and mWidth. Then how does the Snake even work? I am just use the Eclipse and the virtual machine, not a real android phone.
© Stack Overflow or respective owner