yarolegovich / DiscreteScrollView

A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.
5.78k stars 782 forks source link

While using smoothScrollToPosition() the app isn't responding #205

Open sbmvirdi opened 3 years ago

sbmvirdi commented 3 years ago

I have integrated the discrete scroll view with maps and in onMapMarkerSelected I am trying to scroll the discrete scroll view to the marker position but the app is not responding. have tried replacing discrete scroll view with recycler view working fine.

currentLocationSelected.observe(this,selectedLocation->{
            Log.e(TAG, "onCreate: "+selectedLocation.getLocationName());
            int position = infiniteAdapter.getRealCurrentPosition();
            mainBinding.locationScrollView.smoothScrollToPosition(position);
        });

this observer gives the location model class object different details like name of the location, lat, etc.

sbmvirdi commented 3 years ago

this issue is only happening when using an infinite adapter.

einschneidend commented 2 years ago

try to test it on the sample app to see if its a real bug

asthagarg2428 commented 2 years ago

try to test it on the sample app to see if its a real bug

smoothScrollToPosition is really slow. The same slowness can be seen in the DiscreteScrollView sample App.