First Android app: pictures not refreshing -
im new java , android programming , trying write first android app. app shows 3 dices, , depending on combination dices show, app says "yes" "no" or "ultra yes". problem is, when hitting button re-roll, pictures of single dices not updated , reply wrong (i hope somehow clear mean)
in screenshots can see mean. first image right (2 dices showing same numbers means "no"). nail reroll button 1 time again , somehow pictures didn't updated.. occures randomly, works right 10+ times.
http://image-upload.de/image/gbyhnq/ce3ef664bd.png http://image-upload.de/image/j8jstv/97ed7d0f7e.png
the code of app: http://pastebin.com/360dwfcg
thanks in advance newbie ;)
your random dice number generation wrong. creates random number 1 seven.
this long shot, since reply "ultra yes", 3 dice same value. maybe got lucky 7, 7, 7, in case no images updated. alter random generation to
(int) (math.random() * 6 + 1)
android
No comments:
Post a Comment