定制水平滚动浏览与选择器 [英] Custom Horizontal Scroll View with picker

查看:456
本文介绍了定制水平滚动浏览与选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

,用户需要在我的应用程序的注册页,为其创建水平滚动图,在其上的中心元素的数据将被视为用户的以英寸高度,进入它们的重量。

The user needs to enter their weight in the sign up page of my App, for which a horizontal scroll view is created, on which the center element data will be taken as the user's height in inches.

我试着从的Andr​​oid SpinnerWheel 但它仅支持 INT 的价值观和不支持的部分。

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

我也试过的Andr​​oid Horizo​​ntalScrollView与中心锁定库,但它不支持自动滚动。

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

任何人都可以请建议一些例子或提示来实现与作为该领域进入中心元素值上述滚动视图?

Can anyone please suggest some examples or tips to implement the above mentioned scroll view with the center element value taken as the field entry?

先谢谢了!

推荐答案

您可以使用回收查看和设置它,而不是水平滚动使用的自定义库。

You can use 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);

然后centeralize你的愿望的位置,请参阅 Recyclerview滚动。而定制按您的要求。

这篇关于定制水平滚动浏览与选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆