Wheel Picker does not work inside scroll

In my application, I try to use WheelPicker Bruicetoo in its working state, but as I do it inside ScrollViewit stops responding and only activity is scrolled, but I can not scroll WheelPicker. I also tried android:nestedScrollingEnabled="true"in the collector but did not work. The minimum version of the SDK is 21, and the goal is 23.

Updated Code

Markup:

    <ScrollView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="90dp"
        android:layout_marginTop="20dp">

        <com.bruce.pickerview.LoopView
            android:id="@+id/loop_view"
            android:layout_width="50dp"
            android:layout_height="90dp"
            android:layout_below="@+id/calendar_view"
            android:layout_marginBottom="20dp"
            android:layout_marginLeft="20dp"
            android:nestedScrollingEnabled="true"
            app:canLoop="true"
            app:centerTextColor="#ff000000"
            app:drawItemCount="7"
            app:initPosition="3"
            app:lineColor="@color/PrimaryBlue"
            app:textSize="12sp"
            app:topBottomTextColor="#ffafafaf" />
    </LinearLayout>
</ScrollView>

The code:

loopView = (LoopView) findViewById(R.id.loop_view);
        loopView.setInitPosition(2);
        loopView.setCanLoop(false);
        loopView.setLoopListener(new LoopScrollListener() {
            @Override
            public void onItemSelect(int i) {
                     Toast.makeText(RegisterRoomActivity.this, StartHr.get(i), Toast.LENGTH_LONG).show();
            }
        });

        loopView.setTextSize(25);//must be called before setDateList
        loopView.setDataList(StartHr);
+4
source share

Source: https://habr.com/ru/post/1648074/


All Articles