Android and XML Usage
Hai,
I am developing a Puzzle in Android. The puzzle is something like finding a number. It contains 7 steps. Here I use 7 xml files Each file is meant for some operations The 7th file displays the output. There is a Try again button in the 7th file and when the user clicks on that button, it should call the 1st xml file and rep开发者_运维百科eat the same process again. The code for that navigation is something like: setcontentView(R.layout.main1); where main1 is the 1st xml file.
The problem is that, the control goes to the 1st file but the processes can't be repeated.ie. the controls inside that page will be in inactive state.
Can any one give some suggestions here?
Another option would be to raise the initial Intent
on the Try Again button press. This should reinitialise the application, and should have the added benefit of allowing the user to go Back
to their previous result.
These are only ideas though, I'm a noob at Android development....
精彩评论