Java Code Examples for android.support.v4.view.ViewPager#OnPageChangeListener

The following examples show how to use android.support.v4.view.ViewPager#OnPageChangeListener . 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: VerticalViewPager.java    From TLint with Apache License 2.0 5 votes vote down vote up
/**
 * Set a separate OnPageChangeListener for internal use by the support library.
 *
 * @param listener Listener to set
 * @return The old listener that was set, if any.
 */
ViewPager.OnPageChangeListener setInternalPageChangeListener(
        ViewPager.OnPageChangeListener listener) {
    ViewPager.OnPageChangeListener oldListener = mInternalPageChangeListener;
    mInternalPageChangeListener = listener;
    return oldListener;
}
 
Example 2
Source File: CirclePageIndicator.java    From wakao-app with MIT License 5 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 3
Source File: UnderlinePageIndicator.java    From wakao-app with MIT License 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 4
Source File: BrowserView.java    From jmessage-android-uikit with MIT License 4 votes vote down vote up
public void setOnPageChangeListener(ViewPager.OnPageChangeListener onPageChangeListener) {
    mViewPager.setOnPageChangeListener(onPageChangeListener);
}
 
Example 5
Source File: CirclePageIndicator.java    From UltimateAndroid with Apache License 2.0 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 6
Source File: LinePageIndicator.java    From android-open-project-demo with Apache License 2.0 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 7
Source File: TitlePageIndicator.java    From BigApp_WordPress_Android with Apache License 2.0 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 8
Source File: TitlePageIndicator.java    From monolog-android with MIT License 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 9
Source File: LVCustomViewPagerIndicator.java    From VideoOS-Android-SDK with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener onPageChangeListener) {
    mListener = onPageChangeListener;
}
 
Example 10
Source File: CirclePageIndicator.java    From InfiniteViewPager with MIT License 4 votes vote down vote up
@Override
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mListener = listener;
}
 
Example 11
Source File: IntroActivity.java    From Puff-Android with MIT License 4 votes vote down vote up
public void removeOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    if (listener != this.listener)
        pager.removeOnPageChangeListener(listener);
}
 
Example 12
Source File: CBPageChangeListener.java    From o2oa with GNU Affero General Public License v3.0 4 votes vote down vote up
public void setOnPageChangeListener(ViewPager.OnPageChangeListener onPageChangeListener) {
    this.onPageChangeListener = onPageChangeListener;
}
 
Example 13
Source File: YViewPagerNew.java    From YViewPagerDemo with Apache License 2.0 4 votes vote down vote up
public void addOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    if (mOnPageChangeListeners == null) {
        mOnPageChangeListeners = new ArrayList<>();
    }
    mOnPageChangeListeners.add(listener);
}
 
Example 14
Source File: PageIndicator.java    From LLApp with Apache License 2.0 2 votes vote down vote up
/**
 * Set a page change listener which will receive forwarded events.
 * 
 * @param listener
 */
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
 
Example 15
Source File: PageIndicator.java    From wakao-app with MIT License 2 votes vote down vote up
/**
 * Set a page change listener which will receive forwarded events.
 *
 * @param listener
 */
void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
 
Example 16
Source File: PageIndicator.java    From narrate-android with Apache License 2.0 2 votes vote down vote up
/**
 * Set a page change listener which will receive forwarded events.
 *
 * @param listener
 */
void setOnPageChangeListener(ViewPager.OnPageChangeListener listener);
 
Example 17
Source File: VerViewPager.java    From likeJDGoodsDetails with Apache License 2.0 2 votes vote down vote up
/**
 * Set a separate OnPageChangeListener for internal use by the support library.
 *
 * @param listener Listener to set
 * @return The old listener that was set, if any.
 */
ViewPager.OnPageChangeListener setInternalPageChangeListener(ViewPager.OnPageChangeListener listener) {
	ViewPager.OnPageChangeListener oldListener = mInternalPageChangeListener;
	mInternalPageChangeListener = listener;
	return oldListener;
}
 
Example 18
Source File: VerViewPager.java    From likeJDGoodsDetails with Apache License 2.0 2 votes vote down vote up
/**
 * Set a listener that will be invoked whenever the page changes or is incrementally
 * scrolled. See {@link android.support.v4.view.ViewPager.OnPageChangeListener}.
 *
 * @param listener Listener to set
 */
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
	mOnPageChangeListener = listener;
}
 
Example 19
Source File: YViewPagerNew.java    From YViewPagerDemo with Apache License 2.0 2 votes vote down vote up
/**
 * Remove a listener that was previously added via
 * {@link #addOnPageChangeListener(ViewPager.OnPageChangeListener)}.
 *
 * @param listener listener to remove
 */
public void removeOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    if (mOnPageChangeListeners != null) {
        mOnPageChangeListeners.remove(listener);
    }
}
 
Example 20
Source File: SlidingTabLayout.java    From droidddle with Apache License 2.0 2 votes vote down vote up
/**
 * Set the {@link android.support.v4.view.ViewPager.OnPageChangeListener}. When using {@link org.goodev.droidddle.widget.SlidingTabLayout} you are
 * required to set any {@link android.support.v4.view.ViewPager.OnPageChangeListener} through this method. This is so
 * that the layout can update it's scroll position correctly.
 *
 * @see android.support.v4.view.ViewPager#setOnPageChangeListener(android.support.v4.view.ViewPager.OnPageChangeListener)
 */
public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) {
    mViewPagerPageChangeListener = listener;
}