0

my application stop when i click the btn_shapes in this code.. The btn_alphabet and btn_know are working fine, but in the btn_shapes the application stops. No keyboard for id 0 Using default keymap: /system/usr/keychars/qwerty.kcm.bin

public class Eng extends Activity implements OnClickListener {

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

    Button alphabet = (Button) findViewById(R.id.btn_alphabet);
    alphabet.setOnClickListener((OnClickListener)this);

    Button bshapes = (Button) findViewById(R.id.btn_shapes);
    bshapes.setOnClickListener((OnClickListener)this);

    Button know = (Button) findViewById(R.id.btn_know);
    know.setOnClickListener((OnClickListener)this);

}

public void onClick(View v) {
    // TODO Auto-generated method stub
    switch(v.getId()){

    case R.id.btn_alphabet:
        Intent s_alphabet = new Intent(this, Alphabet.class);
        startActivity(s_alphabet);
        break;

    case R.id.btn_shapes:
        Intent s_shapes = new Intent(this, Bshapes.class);
        startActivity(s_shapes);
        break;

    case R.id.btn_know:
        Intent s_know = new Intent(this, Know.class);
        startActivity(s_know);
        break;

    }

}

}

Jeremy
  • 44,950
  • 68
  • 206
  • 332

0 Answers0