Open KnightBubble opened 9 years ago
自定义dialog fragment
package com.example.androidstudytest;
import android.annotation.SuppressLint;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
@SuppressLint("NewApi")
public class myDialogFragment extends DialogFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = null;
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
view = inflater.inflate(R.layout.edit_fragment, container);
return view;
}
}
getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);
去掉默认对话框有个讨厌的标题
mainActivity