I made two bitmaps based off of two ImageViews using this code:
playerimage.buildDrawingCache(); Bitmap bplay1 = playerimage.getDrawingCache(); brickimg.buildDrawingCache(); Bitmap bbrick1 = brickimg.getDrawingCache();
I tried getting the height and width of each bitmap for collision detection, but it made the app crash. This is what I used for it:
int w1 = bplay1.getWidth(); int h1 = bplay1.getHeight(); int w2 = bbrick1.getWidth(); int h2 = bbrick1.getHeight();
Is there a different way to get the coordinates of a bitmap to test collision detection?