开发者

Crashing Livewallpaper

I'm working on a live wallpaper and I want to have some images randomly placed on the background of a surfaceview, everything works in the emulator but when i run it on my the program crashes. I dont know how to get an actual log on my phone because its not rooted.

Below is the code:

Bitmap TOAD = BitmapFactory.decodeResource(getResources(),R.drawable.mushroom);
Canvas cb = new Canvas(开发者_运维知识库Achtergrond); 
for (int m = 0;m < 50;m++)
{
cb.drawBitmap(TOAD, r.nextInt(SchermX), r.nextInt(SchermY), mPaint);
}

On the emulator the toadstools are added and runs correctly, but on my galaxy it crashed

Is there something im doing wrong?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜