custom dialog with close button

前端 未结 8 1750
天涯浪人
天涯浪人 2020-12-01 11:35

I want to create a custom dialog with the layout as shown in the picture. \"enter The cross/cl

8条回答
  •  生来不讨喜
    2020-12-01 11:49

    You can use PopupWindow here. You can Make a layout for your custom dialog and can inflate that layout in PopupWindow.It should be something like this:-

    PopupWindow menuPopup;
    menuView=getLayoutInflater().inflate(R.layout.layout_menu, null);
    menuPopup=new PopupWindow(menuView, 200, 200, false);
    menuPopup.showAtLocation(menuView, Gravity.TOP | Gravity.RIGHT, 0, 100); 
    

提交回复
热议问题