How to create a Custom Dialog box in android?

后端 未结 22 3309
囚心锁ツ
囚心锁ツ 2020-11-21 07:06

I want to create a custom dialog box like below

\"enter

I have tried the foll

22条回答
  •  清歌不尽
    2020-11-21 07:48

    Import custom alert :

    LayoutInflater inflater = (LayoutInflater) getSystemService(LAYOUT_INFLATER_SERVICE);
    View view = inflater.inflate(R.layout.dse_location_list_filter, null);
    final Dialog dialog = new Dialog(Acitvity_name.this);
    dialog.setContentView(view);
    dialog.setCancelable(true);
    dialog.setCanceledOnTouchOutside(true);
    dialog.show();
    

提交回复
热议问题