我多次使用对话框片段,标题边框总是出现,但这次它没有
这是我的代码
public class DailogBox extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
LayoutInflater inflater=getActivity().getLayoutInflater();
builder.setTitle("title");
builder.setMessage("message");
AlertDialog alertdialog = builder.create();
return alertdialog;
}
}
这是我的style.xml
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
我不确定主题是否与问题有关
这是我得到的输出