Skip to content

zhaokai1033/SideslipDemo

Repository files navigation

SideslipDemo

侧滑返回

  • 演示

    image

  • Fragment接入

    //使用方式一:
        @Override
        public final View onCreateView(ViewGroup container, @Nullable Bundle savedInstanceState) {
            View view = inflater.inflate(getLayoutRes(), container, false);
    //        方式 ①: 在此处接入 此处在添加状态页需注意
    //        view = mSwipeClose = SwipeCloseLayout.createFromFragment(view, this, null);//侧滑控件
            return view;
        }
    
    
    //使用方式二:
        @Override
        public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    //        方式②
            mSwipeClose = SwipeCloseLayout.createFromFragment(view, this, null);//侧滑控件
        }

  • Activity 接入

        @Override
        protected final void onPostCreate(@Nullable Bundle savedInstanceState) {
            super.onPostCreate(savedInstanceState);
            mSwipeBack = SwipeCloseLayout.createFromActivity(this, this);//侧滑控件
            mSwipeBack.setSwipeEnabled(mSwipeBackEnable);
        }

About

侧滑返回的示例项目

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages