查找原因是在activity java代码部分继承了compatactivity
public class DialogActivity extends AppCompatActivity
但是在AndroidManifest.xml里面确定义成Dialog,
<activity android:name=".DialogActivity" android:theme="@android:style/Theme.Dialog"></activity>
解决方法是修改activity java代码,继承Activity即可:
public class DialogActivity extends Activity
原文地址:https://www.cnblogs.com/YouXiangLiThon/p/9689675.html
时间: 2024-11-06 17:28:46