You need to use a Theme.AppCompat theme (or descendant) with this activity

前端 未结 30 4135
感动是毒
感动是毒 2020-11-21 04:42

Android Studio 0.4.5

Android documentation for creating custom dialog boxes: http://developer.android.com/guide/topics/ui/dialogs.html

If you want a custom d

30条回答
  •  清酒与你
    2020-11-21 05:00

    I had an activity with theme used for showing dialog in my appWidget and i had same problem

    i solved this error by changing activity code like below:

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setTheme(R.style.Theme_AppCompat_Dialog); //this line i added
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dialog);
    }
    

提交回复
热议问题