Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

why there is no IntelliSense box-problem with OnclickListener

Hi guys,when I wrote getAnserButton. ,there was no intelliscense showing up. can someone explain this to me...............

1 Answer

Matheus G Oliveira
Matheus G Oliveira
9,682 Points

Maybe you are not spelling it right

it is getAnswerButton, which you declare it before the onCreate()

Try to better describe your question posting the code you are having problems

This is the code I wrote. It seems there isn't a spelling problem,but still no intelliscense box showing up.

public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
            // Declare our view variables
        TextView answerLabel = (TextView) findViewById(R.id.textView1);
        Button getAnswerButton = (Button) findViewById(R.id.button1); 

        getAnswerButton.