Android nestedScrollView-如何使其水平? [英] Android nestedScrollView - how to make it horizontal?

查看:73
本文介绍了Android nestedScrollView-如何使其水平?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎找不到 nestedScrollView 将其设置为水平而不是垂直.我一直在使用Horizo​​ntalScrollView,但我想切换到嵌套.反正有这样做吗?搜索文档,我没有看到它,但它确实说它与scrollview一样?

I cant seem to find an option for nestedScrollView to make it horizontal instead of vertical. i have been using HorizontalScrollView but i'd like to switch to nested. Is there anyway to do this ? searching the docs i dont see it yet it does say its the same as a scrollview ?

推荐答案

我不相信 NestedScrollView 可以水平滚动.根据文档:

I do not believe NestedScrollView can be scrolled horizontally. According to docs:

要进行垂直滚动,请考虑使用NestedScrollView而不是滚动视图,它可以提供更大的用户界面灵活性并支持材质设计的滚动模式.

For vertical scrolling, consider NestedScrollView instead of scroll view which offers greater user interface flexibility and support for the material design scrolling patterns.

根据粗体文字,我相信 NestedScrollViews 仅用于垂直滚动.

As per the text in bold, I believe NestedScrollViews were only made to scroll vertically.

NestedScrollViews 是就像 ScrollView 一样"(

While NestedScrollViews are "just like ScrollView" (link), the docs do also state that:

滚动视图仅支持垂直滚动.对于水平滚动,请改用Horizo​​ntalScrollView.

Scroll view supports vertical scrolling only. For horizontal scrolling, use HorizontalScrollView instead.

(两个块引号均来自此处)

这篇关于Android nestedScrollView-如何使其水平?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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