Android nestedScrollView - 如何使其水平?

标签 android

我似乎找不到 nestedScrollView 的选项使其水平而不是垂直。我一直在使用 Horizo​​ntalScrollView 但我想切换到嵌套。有没有办法做到这一点?搜索文档我没有看到它,但它确实说它与 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/

相关文章:

android - IONIC添加android平台

android - Android-通过不同频率的麦克风播放声音

android - 如果 GoogleCredential 已过期,如何检查它

android - 通过 Android 在 Kotlin 中实现 promise

java - 用户注册时如何在服务器上创建目录?

javascript - Android 2.3.x 浏览器将斜杠添加到 <image src="

android - android 设备无法接收 google play 游戏通知的可能原因?

Android 服务没有以警告开始

java - 使用 google-cloud-speech 时在 APK project.properties 中复制的重复文件

java - 如何将带有 Imageview 和 TextView 的 RelativeLayout 转换为 PNG 图像?