Timmy-zzh / TDialog

DialogFragment封装,高效实现各种弹窗效果

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

屏幕旋转,数据持久化

limuyang2 opened this issue · comments

commented

在屏幕旋转后,点击事件有做数据持久化么?

commented

数据都做了序列化

commented

@limuyang2

    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        if (null == rootView) {
            if (getLayoutRes() > 0) {
                rootView = inflater.inflate(getLayoutRes(), container, false);
            }
            if (getDialogView() != null) {
                rootView = getDialogView();
            }
        }
        ViewGroup parent = (ViewGroup) rootView.getParent();
        if (null != parent) parent.removeView(rootView);

        bindView(rootView);
        return rootView;
    }

你要的是这个功能吧