me.imid.swipebacklayout.lib.Utils Java Examples

The following examples show how to use me.imid.swipebacklayout.lib.Utils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SwipeBackActivityHelper.java    From ChipHellClient with Apache License 2.0 6 votes vote down vote up
@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() {

        }
    });
}
 
Example #2
Source File: SwipeBackActivityHelper.java    From SimpleNews with Apache License 2.0 6 votes vote down vote up
@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() {

        }
    });
}
 
Example #3
Source File: SwipeBackActivityHelper.java    From light-novel-library_Wenku8_Android with GNU General Public License v2.0 6 votes vote down vote up
@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() {

        }
    });
}
 
Example #4
Source File: SwipeBackActivityHelper.java    From MaterialQQLite with Apache License 2.0 6 votes vote down vote up
@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() {

        }
    });
}
 
Example #5
Source File: SwipeBackActivityHelper.java    From light-novel-library_Wenku8_Android with GNU General Public License v2.0 6 votes vote down vote up
@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() {

        }
    });
}
 
Example #6
Source File: SwipeBackListenerActivityAdapter.java    From SwipeBackLayout with Apache License 2.0 5 votes vote down vote up
@Override
public void onEdgeTouch(int edgeFlag) {
    Activity activity = mActivity.get();
    if (null != activity) {
        Utils.convertActivityToTranslucent(activity);
    }
}
 
Example #7
Source File: SwipeAppCompatActivity.java    From hacker-news-android with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #8
Source File: SwipeBackActivity.java    From SwipeBackLayout with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #9
Source File: SwipeBackActivity.java    From ChipHellClient with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #10
Source File: SwipeBackActivity.java    From light-novel-library_Wenku8_Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #11
Source File: SwipeBackActivity.java    From light-novel-library_Wenku8_Android with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #12
Source File: BaseSwipeBackActivity.java    From AFBaseLibrary with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #13
Source File: SwipeBackActivity.java    From MaterialQQLite with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #14
Source File: MySwipeBackActivity.java    From MaterialQQLite with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #15
Source File: SwipeBackActivity.java    From ExpressHelper with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #16
Source File: SwipeBackActivity.java    From SimpleNews with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #17
Source File: SwipeBackActivity.java    From SwipeBack with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}
 
Example #18
Source File: UniversalActivity.java    From FantasySlide with Apache License 2.0 4 votes vote down vote up
@Override
public void scrollToFinishActivity() {
    Utils.convertActivityToTranslucent(this);
    getSwipeBackLayout().scrollToFinishActivity();
}