How to create a Custom Dialog box in android?

后端 未结 22 2809
囚心锁ツ
囚心锁ツ 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:35

    Create custom alert layout custom_aler_update.xml

    Then Copy this code to Activity :

    AlertDialog basic_reg;
    AlertDialog.Builder builder ;
    builder = new AlertDialog.Builder(ct, R.style.AppCompatAlertDialogStyle);
    LayoutInflater inflater = ((Activity) ct).getLayoutInflater();
    View v = inflater.inflate(R.layout.custom_aler_update, null);
    builder.setView(v);
    builder.setCancelable(false);
    builder.create();
    basic_reg = builder.show();
    

    Copy this code to style :

    
    

提交回复
热议问题