Fully custom dialog in Android with the same look regardless device

后端 未结 4 1588
离开以前
离开以前 2020-12-19 18:49

I have to build a dialog that looks exactly the same across different devices regardless of the OS theme. At the moment, I created an AlertDialog and I call

4条回答
  •  不思量自难忘°
    2020-12-19 18:57

    create xml file. and use this java code.

                            info_dialog = new Dialog(ActivityName.this);
                            info_dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
                            info_dialog.setContentView(R.layout.info);                          
                            info_dialog.show();
    

提交回复
热议问题