Updating Button Text

Put your problem here if it does not fit any of the other categories.

Updating Button Text

Postby Darrell » Thu Nov 20, 2008 4:08 pm

Hope someone can help with this, I'm a total noob and can't seem to find out how to work this.

What I am trying to do is this:-

My App has 2 Buttons, what I need is for the text on the second button to change each time I press the first button, keeping a count of how many times button 1 has been pressed.

Any help greatfully received.
Darrell
Freshman
Freshman
 
Posts: 9
Joined: Thu Nov 20, 2008 3:31 pm

Top

Postby MrSnowflake » Thu Nov 20, 2008 4:45 pm

Why is this hard? This is done using an int field, and 2 onClickListeners...
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby Darrell » Thu Nov 20, 2008 4:50 pm

This is hard only because of my noob status. I have an onclick listener but i am obviously not getting the syntax right for updating the other button.
Darrell
Freshman
Freshman
 
Posts: 9
Joined: Thu Nov 20, 2008 3:31 pm

Postby MrSnowflake » Thu Nov 20, 2008 6:19 pm

If you are a noob, why not learn proper java first, I mean java programming language, structures and stuff, and then move to Android?! There are awsome tutorials on the java/sun website. And look through the notepad tutorial on the Android site, as it introduces you to all normal Android stuff. You can't ask us to fix your problem.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby Darrell » Fri Nov 21, 2008 11:40 am

I am Learning Both Java and Androids version of it, but am new to both. I have now solved my problem (by myself).

I accept that you are not here to do my coding for me, but that was not what I was asking. Ithink you could have been a bit kinder in your replies.
Darrell
Freshman
Freshman
 
Posts: 9
Joined: Thu Nov 20, 2008 3:31 pm

Postby MrSnowflake » Fri Nov 21, 2008 5:54 pm

Darrell wrote:I accept that you are not here to do my coding for me, but that was not what I was asking. Ithink you could have been a bit kinder in your replies.
You are most probably right, but there are a lot of people like you here, who want us to solve their problems instead of trying to properly learn Java. With this, I want to appologize to you for my rude reply.

Still, I'm convinced you should learn proper Java before engaging in Android development. That doesn't mean you can't learn Java on Android, but you first have to know the basics before learning gui programming.

I'm glad to hear you found the solution to your problem. I think the Swing Tutorials on the Java site should come to good use for Android gui programming too, though you need to use a lot of different functions.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests