完成美颜UI 90%
This commit is contained in:
@@ -29,7 +29,11 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
@Override
|
||||
public Dialog onCreateDialog(Bundle savedInstanceState) {
|
||||
mContext = new WeakReference<>(getActivity()).get();
|
||||
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
||||
if (getLayoutId() == 0) {
|
||||
mRootView = getLayoutView();
|
||||
} else {
|
||||
mRootView = LayoutInflater.from(mContext).inflate(getLayoutId(), null);
|
||||
}
|
||||
final Dialog dialog = new Dialog(mContext, getDialogStyle());
|
||||
dialog.setContentView(mRootView);
|
||||
dialog.setCancelable(canCancel());
|
||||
@@ -47,6 +51,10 @@ public abstract class AbsDialogFragment extends DialogFragment {
|
||||
super.onDismiss(dialog);
|
||||
}
|
||||
|
||||
protected View getLayoutView() {
|
||||
return null;
|
||||
}
|
||||
|
||||
protected abstract int getLayoutId();
|
||||
|
||||
protected abstract int getDialogStyle();
|
||||
|
||||
Reference in New Issue
Block a user