October 30th, 2009, 10:03 AM
|
#4 (permalink)
|
|
Member
Join Date: Sep 2009
Location: San Diego, CA
Posts: 221
Device(s): Samsung Epic 4G
Thanks: 3
Thanked 1 Time in 1 Post
|
I'm still in my early phase of learning Java, but I would imagine it may be best to set the visual template of what you want and populate the background image and on screen data using a while that just never reaches it's conclusion.
I would do it using someting like
Code:
while (true statement) {
randomly.display.fact
}
Your 'true statement' could just be that the next fact has been called for. While it's not technically infinite (in the sense it'll just keep running and eat up your memory and crash), it just always keeps going and you can create a function to randomly select a number/id/name/fact/whatever for the data to display. Maybe include an array that is storing the last 50 or so shown facts that you can check the randomly generated fact against so that they don't repeat too often. So I can't be more help with actual code, but that's the logic I'd approach this with, hope it helps!
|
|
|
Last edited by Gremlyn1; October 30th, 2009 at 10:06 AM.
|
|