posted 3 years ago
I created a button to take me to another page and in that other page, there is another button that takes to another page, and another button to another page, so page1, page2, page3 and page 4 that is not working! This is a picture to see http://oi58.tinypic.com/10zty80.jpg .. when I click on "Fish guide" it takes me to the other one which has another button "Fish", when I click on "Fish" it takes me another page with "Arabian angelfile", when I click on it, it doesn't take me to another page i.e. page 4
File attached
File attached
posted 3 years ago
Not sure what kind of file you were trying to attach, but you can only attach images.
You can post relevant excerpts of your code right here; http://www.coderanch.com/how-to/java/UseCodeTags for that.
You can post relevant excerpts of your code right here; http://www.coderanch.com/how-to/java/UseCodeTags for that.
sasa anali
Ranch Hand
Posts: 30
posted 3 years ago
activity_main.xml (to show "Fish guide")
fishguide.xml (to show "Fish")
fish.xml (to show "Arabian angelfish")
arabianangelfish.xml (to show about the "Arabian angelfish" (it doesn't show))
MainActivity.java (for "fishguide.xml")
PageThree.java (for "fishguide.xml")
MainActivity2.java (for fish.xml)
PageFish.java (for fish.xml)
Here is the things I added but it doesn't go to the fourth button link
MainActivity3.java
PageFishLast.java
PageArabianangelfishies.java
fishguide.xml (to show "Fish")
fish.xml (to show "Arabian angelfish")
arabianangelfish.xml (to show about the "Arabian angelfish" (it doesn't show))
MainActivity.java (for "fishguide.xml")
PageThree.java (for "fishguide.xml")
MainActivity2.java (for fish.xml)
PageFish.java (for fish.xml)
Here is the things I added but it doesn't go to the fourth button link
MainActivity3.java
PageFishLast.java
PageArabianangelfishies.java
posted 3 years ago
You have a MainActivity which uses the activity_main.xml file and adds a click listener to the button:
This brings you to PageThree, which uses fishguide.xml, and adds a click listener to the button:
This brings you to PageFish which uses fish.xml, and doesn't do anything:
You need to make that third activity add a click listener to a button to direct to the fourth page.
You also have a handful of other Activities (MainActivity2, and MainActivity3, and PageFishLast) which use the same layouts but aren't actually displayed, you should get rid of them since they serve only to confuse.
This brings you to PageThree, which uses fishguide.xml, and adds a click listener to the button:
This brings you to PageFish which uses fish.xml, and doesn't do anything:
You need to make that third activity add a click listener to a button to direct to the fourth page.
You also have a handful of other Activities (MainActivity2, and MainActivity3, and PageFishLast) which use the same layouts but aren't actually displayed, you should get rid of them since they serve only to confuse.
Steve
sasa anali
Ranch Hand
Posts: 30
posted 3 years ago
Nope, I won't do your work for you. You have the code you need in the other two activities you use, and you have two activities you aren't using which you posted which has the exact code you need. You just need to put it in the correct place. And if I just post code for you to copy and paste, you won't learn where the correct place is yourself, so it would be a fruitless exercise.
So give it a try. Read my post, find the code, put it in the correct spot. Show us the results and we can help you fine tune it.
sasa anali wrote:I got confused putting these 3 codes, but, can you please type the code for the 4th page? I mixed between what to add to it! Where even!
Nope, I won't do your work for you. You have the code you need in the other two activities you use, and you have two activities you aren't using which you posted which has the exact code you need. You just need to put it in the correct place. And if I just post code for you to copy and paste, you won't learn where the correct place is yourself, so it would be a fruitless exercise.
So give it a try. Read my post, find the code, put it in the correct spot. Show us the results and we can help you fine tune it.
Steve
sasa anali
Ranch Hand
Posts: 30
sasa anali
Ranch Hand
Posts: 30

Forget Steve. Look at this tiny ad:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
|