开发者

Crashing Livewallpaper

开发者 https://www.devze.com 2023-03-31 18:21 出处:网络
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

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

精彩评论

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