查找緣由是在activity java代碼部分繼承了compatactivityjava
public class DialogActivity extends AppCompatActivityandroid
<activity android:name=".DialogActivity"
android:theme="@android:style/Theme.Dialog">
</activity>
public class DialogActivity extends Activity