How to Build AppCompatDialog From AlertDialog.Builder or Equivalent?

前端 未结 4 1545
无人及你
无人及你 2021-02-13 17:21

Before this I used a DialogBuilder to create AlertDialog like this

AlertDialog.Builder builder = new AlertDialog.Builder(context);
...
         


        
4条回答
  •  一整个雨季
    2021-02-13 17:33

    android.support.v7.app.AppCompatDialog is direct parent class of android.support.v7.app.AlertDialog, wherever you can use android.support.v7.app.AlertDialog, you can use android.support.v7.app.AppCompatDialog.

提交回复
热议问题