Search in sources :

Example 1 with DepthPageTransformer

use of com.cyl.musiclake.view.DepthPageTransformer in project MusicLake by caiyonglong.

the class PlayFragment method initViews.

@RequiresApi(api = Build.VERSION_CODES.M)
@Override
public void initViews() {
    // 初始化控件
    topContainer = rootView.findViewById(R.id.top_container);
    mSlidingUpPaneLayout = (SlidingUpPanelLayout) rootView.getParent().getParent();
    // 初始化viewpager
    if (mViewPager != null) {
        setupViewPager(mViewPager);
        mViewPager.setPageTransformer(false, new DepthPageTransformer());
        mViewPager.setOffscreenPageLimit(1);
        mViewPager.setCurrentItem(0);
    }
}
Also used : DepthPageTransformer(com.cyl.musiclake.view.DepthPageTransformer) RequiresApi(android.support.annotation.RequiresApi)

Aggregations

RequiresApi (android.support.annotation.RequiresApi)1 DepthPageTransformer (com.cyl.musiclake.view.DepthPageTransformer)1