How to make the dialog box to fit to both left , right and bottom corners of screen in android.
googleMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {
@Override
public boolean onMarkerClick(Marker arg0) {
googleMap.getUiSettings().setMapToolbarEnabled(true);
final Dialog dialog = new Dialog(getActivity());
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.mapdialogbox);
// dialog.setCanceledOnTouchOutside(false);
Window window = dialog.getWindow();
WindowManager.LayoutParams wlp = window.getAttributes();
wlp.gravity = Gravity.BOTTOM ;
wlp.width = LinearLayout.LayoutParams.FILL_PARENT;
wlp.x = -100;
dialog.show();
}
});
This is how am getting by this code
But i want my dialog box attached to the corners , how can i achieve it