当前位置: 搜索的结果

ScrollDownLayout ScrollView和viewpager同事存在的事件处理

ScrollDownLayout ScrollView和viewpager同事存在的事件处理,并且很好的处理事件问题,
本项目通过自定义ScrollDownLayout和ContentScrollView来处理的,里面嵌入ViewPager。
支持手势下滑退出页面 ,
主要代码如下:
{
 ViewPager viewPager = (ViewPager) findViewById(R.id.view_pager);
        mGirlDesText = (TextView)findViewById(R.id.text_view);
        mScrollDownLayout = (ScrollDownLayout) findViewById(R.id.scroll_down_layout);

        mScrollDownLayout.setMinOffset(0);
        mScrollDownLayout.setMaxOffset(800);
        mScrollDownLayout.setExitOffset(1674);
        mScrollDownLayout.setToOpen();
        mScrollDownLayout.setIsSupportExit(true);
        mScrollDownLayout.setAllowHorizontalScroll(true);
        mScrollDownLayout.setOnScrollChangedListener(mOnScrollChangedListener);

        MainPagerAdapter mainPagerAdapter = new MainPagerAdapter(this);
        mainPagerAdapter.setOnClickItemListener(mOnClickItemListener);
        viewPager.setAdapter(mainPagerAdapter);
        viewPager.setOnPageChangeListener(mOnPageChangeListener);
        initGirlUrl();
        mainPagerAdapter.initViewUrl(mAllGirlList);
        mGirlDesText.setText(mAllGirlList.get(0).getDesContent());

 }

 private void initGirlUrl() {
        mAllGirlList = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            Girl girl = new Girl();
            girl.setImageUrl(Contstants.ImageUrl[i]);
            girl.setDesContent(Contstants.DesContent[i]);
            mAllGirlList.add(girl);
        }
    }

Android-PullPushScrollView

上滑下拉动效ScrollView(模仿淘宝IOS客户端天猫商品详情页面效果)

https://github.com/teisun/Android-PullPushScrollView

AndroidSlidingUpPanel-ScrollView

AndroidSlidingUpPanel-ScrollView

discrollview子元素会呈现不同动画效果的scrollView

当上下滚动的时候子元素会呈现不同动画效果的scrollView,这种设计已经应用在很多网页上。

 https://github.com/flavienlaurent/discrollview

ScrollViewOnTouch

仿百度助手头部搜索框缩放

https://github.com/lijunhuayc/ScrollViewOnTouch