本文整理汇总了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() {
}
});
}
示例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() {
}
});
}
示例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() {
}
});
}
示例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() {
}
});
}
示例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() {
}
});
}
示例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() {
}
});
}