Code Monkey home page Code Monkey logo

Comments (6)

leochuan avatar leochuan commented on July 17, 2024

默认不就是底部的吗??

from viewpagerlayoutmanager.

yuyu06 avatar yuyu06 commented on July 17, 2024

设置gravity为水平,旋转中心是左侧,为垂直,旋转中心却变成右侧。。。

from viewpagerlayoutmanager.

leochuan avatar leochuan commented on July 17, 2024

额,我知道为啥了= = HORIZONTAL = 0 VERTICAL = 1
然后其实 gravity 的参数是LEFT = 0 RIGHT = 1 TOP = 2 BOTTOM = 3

我其实是做了报错了= =。。我把数字改成不一样的好了

private static void assertGravity(int gravity) {
    if (gravity != LEFT && gravity != RIGHT && gravity != TOP && gravity != BOTTOM) {
        throw new IllegalArgumentException("gravity must be one of LEFT RIGHT TOP and BOTTOM");
    }
}

from viewpagerlayoutmanager.

leochuan avatar leochuan commented on July 17, 2024

不是啊 HORIZONTALVERTICLE 不是用于gravity的,你要圆心在底部的话 设置gravityBOTTOM, 或者直接不设默认就是底部

from viewpagerlayoutmanager.

yuyu06 avatar yuyu06 commented on July 17, 2024

感谢了。
但是我觉得您应该出一个api可以设置中间的Item到屏幕底部(或者顶部)的距离。

from viewpagerlayoutmanager.

leochuan avatar leochuan commented on July 17, 2024

加了setDistanceToBottom(int distance)
fix by: dbe10a7

from viewpagerlayoutmanager.

Related Issues (20)

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.