Basic Android Help?
<p>SUPER FINAL LAST EDIT: i got it to work exactly how i wanted it to... and i think i learned something very valuable. First, i had to change the ID of the TextView (my old code said  r.id.usebuttonid. That is wrong. that referenced the button's text characteristic. i simply changed that and fixed a small problem with the string name for the TextView's ID String and it worked like a charm! Thank you all! i appreciate your input. The final code is below)</p>

<p>Final Code:</p>

<pre><code>package com.jwright.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class testerproject extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    final TextView joke = (TextView) findViewById(R.string.UseButtonID);
}

public void UseButtonOnClick(View view)
{
    final TextView joke = (TextView) findViewById(R.string.TextViewID);
    joke.setText("changed!");
    return;
}
</code></pre>

<p>}</p>

<hr>

<p>Hello StackOverflow. I am new to android programming, but not new to java (i have to program in java for a class i take at my school) and am trying to learn the basics. I have looked through the "tutorials" on the developer site but cannot find them of any decent help.</p>

<p>I am simply trying to start small and work my way up. I want to slightly modify the basic program so that when i press a button, it changes the text to Changed!</p>

<p>i used the following code:</p>

<pre><code>package com.jwright.test;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class testerproject extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    final TextView joke = (TextView) findViewById(R.string.UseButtonID);
}

public void UseButtonOnClick(View view)
{
    final TextView joke = (TextView) findViewById(R.string.UseButtonID);
    joke.setText("changed!");
    return;
}
`}`
</code></pre>

<p>to create the button and try to change the text. Eclipse says it all checks out fine (no red marks, only some yellow ones) but when i run it on my phone (HTC EVO) and click the button (NOTE: it does work if i dont click the button... only once i click the button) it tells me that the application has stopped unexpectedly. please try again.</p>

<p>if anyone could explain to me what i need to do to help you guys or if you can help me figure out my error, that would be great.!</p>

<p>Even better, if somebody knows of a free resource i could use that is much clearer and easier to understand than the developer tutorials, that would be great!</p>

<p>thank you very much in advance!</p>

<p>James</p>

<p>EDITED EDIT:
I figured out part of my error. I called the method the name of the string that i set the button's onclick value to, not the value of that string. problem 1: SOLVED.</p>

<p>HOWEVER! when the button was clicked... it changed the text on the button itself, not the textview's text. any ideas? The code above is changed to reflect the current working code.</p>
