SliderImageLayout.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:SliderImageLayout 作者:
private void initView()
{
    mListImgView = new ArrayList<>();
    titleTexts = new ArrayList<>();

    mInflater = LayoutInflater.from(mContext);
    View view = mInflater.inflate(R.layout.view_slider_layout , this);
    mDotLayout = (LinearLayout) view.findViewById(R.id.ll_dot_group);
    mTitleTV = (TextView) view.findViewById(R.id.tv_img_desc);
    mViewPager = (ViewPager) view.findViewById(R.id.viewPager);
    mViewPager.setPageTransformer(true , new DepthPageTransformer());
    mViewPager.setOnPageChangeListener(this);

    try
    {
        Field mField = ViewPager.class.getDeclaredField("mScroller");
        mField.setAccessible(true);
        mScroller = new FixedSpeedScroller(mContext ,new AccelerateInterpolator());
        mField.set(mViewPager , mScroller);
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号