I have to connect three activities "rectangle, circle, triangle", which once selected on main screen, brings me to my other activity screens. but when I click on " example" rectangle, it brings me back to my start button " click here to pick a shape"
Code:
Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case 0:
return new AlertDialog.Builder(this)
.setIcon(R.drawable.ic_launcher)
.setTitle("Please pick a Shape")
.setItems(items,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int which) {
switch (which) {
case 1:
startActivity(new Intent(getApplicationContext(), Rectangle_Activity.class));
break;
case 2:
startActivity(new Intent(getApplicationContext(), Circle_Activity.class));
break;
case 3:
startActivity(new Intent(getApplicationContext(), Triangle_Activity.class));
break;
default: break;
}