@Test public void parallaxSetupTest() { SingleFragmentTestActivity activity = launchAndWaitActivity(DetailsFragmentTest.DetailsFragmentParallax.class, new SingleFragmentTestBase.Options().uiVisibility( View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN), 0); double delta = 0.0002; DetailsParallax dpm = ((DetailsFragment) activity.getTestFragment()).getParallax(); RecyclerViewParallax.ChildPositionProperty frameTop = (RecyclerViewParallax.ChildPositionProperty) dpm.getOverviewRowTop(); assertEquals(0f, frameTop.getFraction(), delta); assertEquals(0f, frameTop.getAdapterPosition(), delta); RecyclerViewParallax.ChildPositionProperty frameBottom = (RecyclerViewParallax.ChildPositionProperty) dpm.getOverviewRowBottom(); assertEquals(1f, frameBottom.getFraction(), delta); assertEquals(0f, frameBottom.getAdapterPosition(), delta); }
public DetailsParallax getParallax() { if (mDetailsParallax == null) { mDetailsParallax = new DetailsParallax(); if (mRowsFragment != null && mRowsFragment.getView() != null) { mDetailsParallax.setRecyclerView(mRowsFragment.getVerticalGridView()); } } return mDetailsParallax; }
DetailsFragment extends BaseFragment { public DetailsParallax getParallax() { if (mDetailsParallax == null) { mDetailsParallax = new DetailsParallax(); if (mRowsFragment != null && mRowsFragment.getView() != null) { mDetailsParallax.setRecyclerView(mRowsFragment.getVerticalGridView()); } } return mDetailsParallax; } }
DetailsFragment extends BaseFragment { public DetailsParallax getParallax() { if (mDetailsParallax == null) { mDetailsParallax = new DetailsParallax(); if (mRowsFragment != null && mRowsFragment.getView() != null) { mDetailsParallax.setRecyclerView(mRowsFragment.getVerticalGridView()); } } return mDetailsParallax; }  }
DetailsFragment extends BaseFragment { public DetailsParallax getParallax() { if (mDetailsParallax == null) { mDetailsParallax = new DetailsParallax(); if (mRowsFragment != null && mRowsFragment.getView() != null) { mDetailsParallax.setRecyclerView(mRowsFragment.getVerticalGridView()); } } return mDetailsParallax; }  void setAdapter(ObjectAdapter adapter); ObjectAdapter getAdapter(); void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener); void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener); BaseOnItemViewClickedListener getOnItemViewClickedListener(); @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState); @Override View onInflateTitleView(LayoutInflater inflater, ViewGroup parent,
                                   Bundle savedInstanceState); RowsFragment getRowsFragment(); void setSelectedPosition(int position); void setSelectedPosition(int position, boolean smooth); @Override void onStop(); @Override void onStart(); DetailsParallax getParallax(); }
DetailsFragment extends BaseFragment { public DetailsParallax getParallax() { if (mDetailsParallax == null) { mDetailsParallax = new DetailsParallax(); if (mRowsFragment != null && mRowsFragment.getView() != null) { mDetailsParallax.setRecyclerView(mRowsFragment.getVerticalGridView()); } } return mDetailsParallax; }  void setAdapter(ObjectAdapter adapter); ObjectAdapter getAdapter(); void setOnItemViewSelectedListener(BaseOnItemViewSelectedListener listener); void setOnItemViewClickedListener(BaseOnItemViewClickedListener listener); BaseOnItemViewClickedListener getOnItemViewClickedListener(); @Override void onCreate(Bundle savedInstanceState); @Override View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState); @Override View onInflateTitleView(LayoutInflater inflater, ViewGroup parent,
                                   Bundle savedInstanceState); RowsFragment getRowsFragment(); void setSelectedPosition(int position); void setSelectedPosition(int position, boolean smooth); @Override void onStop(); @Override void onStart(); DetailsParallax getParallax();  }