• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change text in another activity on click. how?

 
smilie graf
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there

I am new to this forum as an User, and I am also new to Java and Android, in developing ways. Sorry if there are any language or other mistakes.

So I am trying to make an app for a 'final' school project, which has the follow use:

The user sees a picture, a 'next' and a 'finish' button. there are 11 pictures (user only sees one) when the user clicks 'next', the pic no. 2 appears, if he clicks another time next, the picture no. 3 appears and so on.
when user clicks next 2 times (so if he made it until the 3rd picture) and then clicks finish, he'll Return to the main activity, and instead of the text 'Klicke auf start um zu beginnen' (click on start to begin) the text 'you made it until the 3rd picture' should show up.
If he clicked Next 5 times (6th picture) and clicks finish, he also returns to the main activity, but the text is 'you made it until the 5th picture'.
And so on with the others.

I've tried this, but I failed.

the red lines are those, which I made at my own but they unfortunately don't work

Java Main Activity






XML Main Activity




Java 2nd activity



Code:



XML 2nd Activity






The most important strings:




Thank you so much
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What does the code do now, how is that different from what you were expecting, and where exactly are you stuck implementing the required changes?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic