why does my code crash
<p>So I am running a tutorial app, and it all works except when I try to run the bellow class, however I don't get errors in the code so I was wondering if anyone could help if there is maybe something wrong with the code.</p>

<p>Also on a side not when programming for example you type say:  android: in the xml or something.  in java  how come I don't get the drop down menu with all the options of what can go after?</p>

<p>code:</p>

<pre><code>package com.example.learn.tam;

import java.util.Random;

import android.app.Activity; 
import android.graphics.Color;
import android.os.Bundle;
import android.text.InputType;
import android.view.Gravity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.ToggleButton;

public class textplay extends Activity implements View.OnClickListener{

Button chkCommand;
ToggleButton passToggle;
EditText input;
TextView display;

@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    setContentView(R.layout.text);

    holder();

    passToggle.setOnClickListener(this);

    chkCommand.setOnClickListener(this);
}

private void holder() {

    Button chkCommand = (Button) findViewById(R.id.bResults);
    passToggle = (ToggleButton) findViewById(R.id.tbPassword);
    input = (EditText) findViewById(R.id.etCommands);
    display = (TextView) findViewById(R.id.tvResults);

}

@Override
public void onClick(View v) {
    switch(v.getId()){
    case R.id.bResults:

        String check = input.getText().toString();

        display.setText(check);

        if(check.contentEquals("left")){
            display.setGravity(Gravity.LEFT);
        }
        else if(check.contentEquals("center")) {
            display.setGravity(Gravity.CENTER);
        }
        else if(check.contentEquals("right")){
            display.setGravity(Gravity.RIGHT);
        }
        else if(check.contentEquals("blue")){
            display.setTextColor(Color.BLUE);
        }
        else if(check.contentEquals("WTF")){
            Random crazy = new Random();
            display.setText("WTF!!!!");
            display.setTextSize(crazy.nextInt(75));
            display.setTextColor(Color.rgb(crazy.nextInt(265),crazy.nextInt(265),crazy.nextInt(265)));

            switch(crazy.nextInt(3)){
            case 0:
                display.setGravity(Gravity.LEFT);
                break;
            case 1:
                display.setGravity(Gravity.CENTER);
                break;
            case 2:
                display.setGravity(Gravity.RIGHT);
                break;
            }
        }
        else{
            display.setText("Invalid");
            display.setGravity(Gravity.CENTER);
            display.setTextColor(Color.WHITE);
        }


        break;
        case R.id.tbPassword:

        if (passToggle.isChecked() == true){
            input.setInputType(InputType.TYPE_CLASS_TEXT  | InputType.TYPE_TEXT_VARIATION_PASSWORD);
        }else{
            input.setInputType(InputType.TYPE_CLASS_TEXT);
        }
        break;
    }
}
}
</code></pre>
