当前位置: 首页>>代码示例>>Java>>正文


Java SwipeBackLayout.addSwipeListener方法代码示例

本文整理汇总了Java中me.imid.swipebacklayout.lib.SwipeBackLayout.addSwipeListener方法的典型用法代码示例。如果您正苦于以下问题:Java SwipeBackLayout.addSwipeListener方法的具体用法?Java SwipeBackLayout.addSwipeListener怎么用?Java SwipeBackLayout.addSwipeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在me.imid.swipebacklayout.lib.SwipeBackLayout的用法示例。


在下文中一共展示了SwipeBackLayout.addSwipeListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(
            me.imid.swipebacklayout.lib.R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            Utils.convertActivityToTranslucent(mActivity);
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:Ztiany,项目名称:SystemBarTint,代码行数:23,代码来源:SwipeBackActivityHelper.java

示例2: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(
            R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            Utils.convertActivityToTranslucent(mActivity);
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:libit,项目名称:lr_dialer,代码行数:23,代码来源:SwipeBackActivityHelper.java

示例3: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(0));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = new SwipeBackLayout(mActivity);
    mSwipeBackLayout.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT));
    mSwipeBackLayout.setEdgeTrackingEnabled(SwipeBackLayout.EDGE_LEFT);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
            if (state == SwipeBackLayout.STATE_IDLE && scrollPercent == 0) {
                convertActivityFromTranslucent();
            }
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            convertActivityToTranslucent();
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:hoyin258,项目名称:MisterWok,代码行数:27,代码来源:SwipeBackActivityHelper.java

示例4: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(
           R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            Utils.convertActivityToTranslucent(mActivity);
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:MewX,项目名称:light-novel-library_Wenku8_Android,代码行数:23,代码来源:SwipeBackActivityHelper.java

示例5: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(0));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(
            R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
            if (state == SwipeBackLayout.STATE_IDLE && scrollPercent == 0) {
                convertActivityFromTranslucent();
            }
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            convertActivityToTranslucent();
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:bitjjj,项目名称:GameRecorder,代码行数:26,代码来源:SwipeBackActivityHelper.java

示例6: onActivityCreate

import me.imid.swipebacklayout.lib.SwipeBackLayout; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
public void onActivityCreate() {
    mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
    mActivity.getWindow().getDecorView().setBackgroundDrawable(null);
    mSwipeBackLayout = (SwipeBackLayout) LayoutInflater.from(mActivity).inflate(
            me.imid.swipebacklayout.lib.R.layout.swipeback_layout, null);
    mSwipeBackLayout.addSwipeListener(new SwipeBackLayout.SwipeListener() {
        @Override
        public void onScrollStateChange(int state, float scrollPercent) {
            if (state == SwipeBackLayout.STATE_IDLE && scrollPercent == 0) {
                Utils.convertActivityFromTranslucent(mActivity);
            }
        }

        @Override
        public void onEdgeTouch(int edgeFlag) {
            Utils.convertActivityToTranslucent(mActivity);
        }

        @Override
        public void onScrollOverThreshold() {

        }
    });
}
 
开发者ID:yrom,项目名称:AcFun-Area63,代码行数:26,代码来源:SwipeBackActivityHelper.java


注:本文中的me.imid.swipebacklayout.lib.SwipeBackLayout.addSwipeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。