完成美颜UI 90%

This commit is contained in:
2022-09-20 18:29:05 +08:00
parent c634d29e79
commit d1d31da6be
136 changed files with 5028 additions and 305 deletions

View File

@@ -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();