public class WelcomeFullScreenParallaxFragment extends Fragment implements WelcomePage.OnChangeListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
KEY_END_FACTOR |
static java.lang.String |
KEY_LAYOUT_ID |
static java.lang.String |
KEY_PARALLAX_RECURSIVE |
static java.lang.String |
KEY_START_FACTOR |
Constructor and Description |
---|
WelcomeFullScreenParallaxFragment() |
Modifier and Type | Method and Description |
---|---|
static WelcomeFullScreenParallaxFragment |
newInstance(int layoutId,
float startParallaxFactor,
float endParallaxFactor,
boolean parallaxRecursive) |
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
void |
onStart() |
void |
onWelcomeScreenPageScrolled(int pageIndex,
float offset,
int offsetPixels)
Called when this page is coming into view
|
void |
onWelcomeScreenPageScrollStateChanged(int pageIndex,
int state)
Called when the scroll state of the ViewPager changes
|
void |
onWelcomeScreenPageSelected(int pageIndex,
int selectedPageIndex)
Called when the selected page changes
|
public static final java.lang.String KEY_LAYOUT_ID
public static final java.lang.String KEY_START_FACTOR
public static final java.lang.String KEY_END_FACTOR
public static final java.lang.String KEY_PARALLAX_RECURSIVE
public static WelcomeFullScreenParallaxFragment newInstance(@LayoutRes int layoutId, float startParallaxFactor, float endParallaxFactor, boolean parallaxRecursive)
@Nullable public android.view.View onCreateView(android.view.LayoutInflater inflater, android.view.ViewGroup container, android.os.Bundle savedInstanceState)
public void onStart()
public void onWelcomeScreenPageScrolled(int pageIndex, float offset, int offsetPixels)
WelcomePage.OnChangeListener
onWelcomeScreenPageScrolled
in interface WelcomePage.OnChangeListener
pageIndex
- The position index of this pageoffset
- The % offset of this page, negative if page is off the screen on the right, positive if off on the leftoffsetPixels
- The offset of this page in pixels, negative if page is off the screen on the right, positive if off on the leftpublic void onWelcomeScreenPageSelected(int pageIndex, int selectedPageIndex)
WelcomePage.OnChangeListener
onWelcomeScreenPageSelected
in interface WelcomePage.OnChangeListener
pageIndex
- The position index of this pageselectedPageIndex
- The index of the page that was selectedpublic void onWelcomeScreenPageScrollStateChanged(int pageIndex, int state)
WelcomePage.OnChangeListener
onWelcomeScreenPageScrollStateChanged
in interface WelcomePage.OnChangeListener
pageIndex
- The position index of this pagestate
- The new scroll state