Is it possible to change the location of the button on the dialog to the outside of the dialog itself? something like this (the red squares are buttons):
Yes. All you have to do is create a custom dialog layout.
In order to achieve that you would create a LinearLayout
with Transparent BG color and inside it you can do whatever is it that you want.
A quick example:
... your content here
If you are using a builder to create your Dialog
, you would go for this:
LayoutInflater inflater = getActivity().getLayoutInflater();
builder.setView(inflater.inflate(R.layout.your_dialog_layout, null))
...otherwise
Dialog newDialog = new Dialog();
newDialog.setContentView(R.layout.your_dialog_layout);