Android Question Just starting. Error on line... I don't have that many

Nimbus4

Member
Licensed User
Longtime User
Screenshot attached. I'm just starting out, and am making a simple app. I keep getting error on line 72? I don't have a line 72. It doesn't cause the app to crash, but... I'm confused. I hate being confused. It's so confusing being confused.
 

Attachments

  • huh.png
    huh.png
    127.3 KB · Views: 157

Nimbus4

Member
Licensed User
Longtime User
Now I'm even more confused. I changed nothing and it went away. All I did was take a screenshot, write this post, then go back and rerun the code, and it's gone.
 
Upvote 0

nobbi59

Active Member
Licensed User
Longtime User
This Error is happening, when you initialize a Canvas on a View that has a width or height < 0. For example when you have height -1 to Fill the parent.

But I dont see why the Error is gone. Maybe try to log the size of the canvas view and try to prevent this Error from happening again.
 
Upvote 0

SNOUHyhQs2

Member
Licensed User
Longtime User
Screenshot attached. I'm just starting out, and am making a simple app. I keep getting error on line 72? I don't have a line 72. It doesn't cause the app to crash, but... I'm confused. I hate being confused. It's so confusing being confused.

why not just use Activity.Width/Activity.Height instead of GetDeviceLayoutValues?
 
Upvote 0
Top