Skip to content

必现错误getWillPickIndexByGlobalY illegal index : 5 getOneRecycleSize() : 1 mWrapSelectorWheel : false #78

@unloadme

Description

@unloadme

必现错误getWillPickIndexByGlobalY illegal index : 5 getOneRecycleSize() : 1 mWrapSelectorWheel : false

必现代码

布局文件

<cn.carbswang.android.numberpickerview.library.NumberPickerView
android:id="@+id/npv_test"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:layout_weight="1"
android:contentDescription="test_number_picker_view"
app:layout_constraintLeft_toRightOf="@id/npv_picker_high"
app:layout_constraintRight_toLeftOf="@id/npv_unit"
app:npv_DividerColor="#00000000"
app:npv_DividerHeight="0px"
app:npv_ItemPaddingVertical="10dp"
app:npv_RespondChangeOnDetached="false"
app:npv_ShownCount="5"
app:npv_TextColorNormal="#d1d1d1"
app:npv_TextColorSelected="#121325"
app:npv_TextSizeNormal="15sp"
app:npv_TextSizeSelected="16sp"
app:npv_WrapSelectorWheel="true" />

    String[] test = new String[100];
    for(int i=0;i<100;i++){
        test[i] = String.valueOf(i);
    }
    npv_test = findViewById(R.id.npv_test);
    npv_test.setDisplayedValues(test);

我如果设置显示范围的时候,然后.setWrapSelectorWheel(false);然后向上滑动,就会抛出这个错误:
比如说
npv_test.setMinAndMaxShowIndex(5,5);
npv_test.setWrapSelectorWheel(false);

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