如何禁用图库中的滚动
当图库中的图片少于 5 张时,我尝试实现禁用图库滚动。如果我有超过 6 张图片,则滚动将启用图库中的滚动! 但我不知道如何实现它。我已经参考了“选择的图库默认项目位于中心”,将第一张图片调整到左侧,
调整第一张图片后,我参考"如何停止滚动画廊?” ,但它不起作用!和 “禁用滚动的 Android 自定义图库..” 没有任何解决方案..
有人有想法吗?如何禁用图库中图片的滚动?
I'm try to implement disable Gallery scrolling when pictures in gallery is less than 5 pictures.If I have more than 6 pics the scrolling will enable scrolling in Gallery!
but I have no idea how to implement it. I have already reference "Gallery default item selected is in center", to adjust first picture to the left,
after adjust the first picture, I reference "how to stop scrolling gallery?" , but it doesn't work! and "Android Custom gallery to disable scrolling.." don't have any solution..
Any one have idea? how to disable scrolling the picture in Gallery?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这里,我给你一个解决方案,无论我从你的问题中得到什么,代替画廊,你可以使用水平滚动视图制作像画廊一样的视图,在其中添加线性布局,如果图像动态地进入线性布局,则动态添加图像视图,这样它就会解决滚动问题和左对齐问题。
Here I am giving you one solution whatever I am getting from your question In place of gallery You can make view like gallery by using Horizontal scroll view, add linearLayout in that and add image view dynamically if images is coming dynamically to linearLayout so it will resolved scrolling issue and left align problem as well.