Hi guys i m from an iPhone background and new to android..i ve got two exitText fields and a button in xml layout,connected to the class AddKeyWord.when i click the button i wanted to dismiss my java class..is it possible.i don’t want click the back button to go to my previous view.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.addkeyword);
btnCreate=(Button) findViewById(R.id.button1);
btnCreate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
});
}
}
If your java class is a activity, use ActivityName.this.finish()