Custom horizontal scroll view with picker

The user needs to enter their weight on the registration page of my application, for which a horizontal scroll view is created, on which the data of the central element will be considered the height of the user in inches.

enter image description here

I tried to implement the Spinner Wheel Library from Android SpinnerWheel , but it only supports int values ​​and does not support fractions.

I also tried Android HorizontalScrollView with the Center Lock library , but does not support auto-scrolling.

Can someone offer some examples or tips for implementing the aforementioned scroll with the central value of the element taken as a field entry?

Thank Advance

+7
android android-scrollview
source share
2 answers

You can use the recycler view and set it to scroll horizontally instead of using any custom library.

  RecyclerView recycler= (RecyclerView) itemView.findViewById(R.id.recycler); LinearLayoutManager llManager = new LinearLayoutManager(mcontext, LinearLayoutManager.HORIZONTAL, false); recycler.setLayoutManager(llManager); 

Then, to centralize the location of your desire, see Scrolling Recyclerview . And customize it according to your requirement

+1
source share

Try using this open source library . It is licensed under Apache 2.0. I believe that we can change its code to meet the requirements

0
source share

All Articles