Skip to content

getSelectedItem 获取位置异常 #70

Description

@18702953620

主要属性设置

                app:awv_itemsVisibleCount="7"
                app:awv_lineSpace="1.5"
                app:awv_textsize="17"

当数据只有2条时(3条以上正常)preCurrentIndex计算有误
onDraw方法

change = (int) (totalScrollY / (lineSpacingMultiplier * itemTextHeight));
        preCurrentIndex = initPosition + change % items.size();

其中,totalScrollY为133,lineSpacingMultiplier为1.5 ,itemTextHeight为89,此时change计算结果为0,preCurrentIndex结果异常

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions