Giter VIP home page Giter VIP logo

viewpager's Introduction

Gradle


本库需要依赖以下库:

implementation 'com.android.support:support-v4:+'

FViewPager

  • 解决设置高度为wrap_content无效

  • 当ViewPager嵌套ViewPager的时候,有些情况下不希望内部的ViewPager滚动到边界的时候继续拖动导致外部的ViewPager发生滚动
    解决方案:使用FViewPager.addPullCondition(pullCondition)方法来给外部的ViewPager设置一个拖动条件限制,当拖动的触摸点在内部ViewPager可见范围之内的时候返回false不允许拖动

FGridViewPager

/**
 * 设置每页要显示的item数量
 */
mViewPager.setGridItemCountPerPage(9);
/**
 * 设置每页的数据要按几列展示
 */
mViewPager.setGridColumnCountPerPage(3);
/**
 * 设置横分割线
 */
mViewPager.setGridHorizontalDivider(getResources().getDrawable(R.drawable.divider_horizontal));
/**
 * 设置竖分割线
 */
mViewPager.setGridVerticalDivider(getResources().getDrawable(R.drawable.divider_vertical));
/**
 * 设置适配器,android.widget.BaseAdapter
 */
mViewPager.setGridAdapter(mAdapter);

viewpager's People

Contributors

zj565061763 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.