*****************Its not running,when i type left/right/etc. and after typing when I pressed "Try Command" button,,,,this message prompts" unfortu. ,splash stops working".....so please kindly help me to fix this. asap.

*TextPlay.java:
package com.example.splash;

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;
/** tutorial 25,26,27,28,29,30 (setting Gravity here...),31(Random),32(switch-case) */
public class TextPlay extends Activity{

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

setContentView(R.layout.text);

Button chkCmd=(Button) findViewById(R.id.bResults);
final ToggleButton passTog= (ToggleButton) findViewById(R.id.tbPassword); /** made it "final"-bcz its gonna b chngd...*/
final EditText input= (EditText) findViewById(R.id.etCommands);
final TextView display= (TextView) findViewById(R.id.tvDisplay);

passTog.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
if(passTog.isChecked()){
input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
}
else{
input.setInputType(InputType.TYPE_CLASS_TEXT);
}
}
});

chkCmd.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
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.contains("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);
}
}
});
}
}

/////////// text.xml:



/** tutorial-22,23,24 */










///////////////////////////////////////////// reply asap any1/travis sir/////////////////////