I have an Activity named whereActity
which has child dialogs as well. Now, I want to display this activity as a dialog for another activity.
How can I d
If your activity is being rendered as a dialog, simply add a button to your activity's xml,
Then attach a click listener in your Activity's Java code. In the listener, simply call finish()
Button close_button = (Button) findViewById(R.id.close_button);
close_button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
That should dismiss your dialog, returning you to the calling activity.