0

I tried to make a transparent background, but the solutions that I tried didn't work.

The background color of the parts I marked.

When I click a marker on the map this dialog should open with transparent background. How can I do it?

  • If you are using `InfoWindow` then you should try https://stackoverflow.com/questions/19045793/is-possible-to-create-a-transparent-info-window-with-map-v2 and https://stackoverflow.com/questions/16518338/how-to-put-drawable-as-a-background-on-infowindow-google-maps-api-v2-for-androi – ADM Mar 10 '21 at 08:14

1 Answers1

0

If you are using a dialog, then please try

dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));

before calling dialog.show()

Sanjid Chowdhury
  • 1,010
  • 1
  • 5
  • 9
  • 1
    thank you it worked, with this way AlertDialog alertDialog = new AlertDialog.Builder(context) .setView(R.layout.dialog_layout) .setCancelable(true) .show(); alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); – natiq natiq Mar 10 '21 at 12:59