android - BottomSheetBehaviour 布局中的 MapLayout 上下滚动 Map Activity 时出错
问题描述
有没有办法BottomScrollBehaviour
实现只有具有拖动功能但没有 NestedScrollView 的内部布局。
我问这个问题是因为我使用的是Fragment MapLayout
内部NestedScrollView
布局。
因此,当在地图上拖动left
和right
反之时,会发生什么情况.
这是我的布局:
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.core.widget.NestedScrollView
android:padding="10dp"
android:id="@+id/homeMap"
android:layout_marginTop="100dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:behavior_hideable="false"
android:background="#75A359"
android:fillViewport="true"
app:behavior_peekHeight="0dp"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="15dp">
<include layout="@layout/our_work"/> <!-- My Map Activity-->
</androidx.cardview.widget.CardView>
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
那么有没有一种方法可以使用地图布局,因为我们通常使用谷歌地图向上、向下、向右和向左拖动并查看位置,因为在我的情况下,我无法向上和向下拖动,反之亦然但是当我在 BottomSheetBehaviour 中使用时,我可以从左向右拖动,反之亦然。而且我必须在 BottomSheetBehaviour 中使用它NestedScrollView
。
有什么专长吗?
解决方案
推荐阅读
- c++ - 如何选择要随机化的数组中的特定数字?C++
- arrays - 数组函数有些不缩小类型,即使使用类型谓词,替代解决方案?
- aws-lambda - 从 AWS Lambda 创建复杂的参数驱动查询?
- c++ - 从基类访问派生的虚函数,好的做法?
- java - Java 改造 | 在 lambda 表达式中调用方法的返回值
- javascript - 请确保它具有适当的“as”值并且是有意预加载的
- javascript - 如何在 discord.js v12 中使用 user.bot?
- javascript - 使用 Google 表格脚本创建 Google 日历活动有错误
- c# - 在 .NET Core 3.1 和 EF Core 中执行存储过程
- c - 为什么这个宏不像我想的那样工作?