Set custom layout in popup window in android

前端 未结 6 1855
别那么骄傲
别那么骄傲 2020-12-05 23:42

I have a problem with popup window. I want to create popup window with my own layout. This is code:

public class PopupWindowView extends PopupWindow{

    P         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-06 00:28

    try this......

    public void popUpWindow() {
        final Dialog dialog = new Dialog(MainActivity.this);
        dialog.setContentView(R.layout.client_details);
        dialog.setTitle("Client Details");
        dialog.show();
    }
    

提交回复
热议问题