我似乎找不到 nestedScrollView 的选项使其水平而不是垂直。我一直在使用 HorizontalScrollView 但我想切换到嵌套。有没有办法做到这一点?搜索文档我没有看到它,但它确实说它与 ScrollView 相同?
最佳答案
否
我不相信 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
只能垂直滚动。
虽然 NestedScrollViews
“就像 ScrollView
”(link),但文档也指出:
Scroll view supports vertical scrolling only. For horizontal scrolling, use HorizontalScrollView instead.
(两个 block 引用都来自 here )
关于Android nestedScrollView - 如何使其水平?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44798354/