Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Luqman Shah
188 PointsWhat does Eclipse do in Build a Simple Android App?
I understand it answers questions when you shake it, but how? If you shake it, how does it know which question was running through your mind, and how does it have all those answers programmed into the app? Someone tell me how this works.
1 Answer
Amit Bijlani
Treehouse Guest TeacherEclipse is simply an IDE (integrated development environment) that you use to write your code and preview your app in the emulator.
This is how the Crystal Ball app works on either platform:
- You programmatically add all the answers in an array
- Randomly generate a number which then accesses and displays one of the answers from the array on the screen.