In my application I am trying to use a WheelPicker by Bruicetoo its working fine but as I out it inside ScrollView
it stops responding and only activity is scrolled but I am unable to scroll the WheelPicker. I have also tried android:nestedScrollingEnabled="true"
in picker but didn't work. Minimum SDK version is 21 and target v. 23.
Updated Code
Layout:
<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>
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);