TDialog icon indicating copy to clipboard operation
TDialog copied to clipboard

屏幕旋转,数据持久化

Open limuyang2 opened this issue 6 years ago • 2 comments

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

limuyang2 avatar Jun 28 '18 09:06 limuyang2

数据都做了序列化

Timmy-zzh avatar Jul 10 '18 05:07 Timmy-zzh

@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;
    }

你要的是这个功能吧

zwping avatar Jul 16 '18 02:07 zwping