我在appbar布局中有一个可折叠的工具栏。它包含一个正在折叠内容的视图页签和一个固定的操作工具栏。该活动在折叠工具栏下方也有一个嵌套的滚动视图。嵌套的滚动视图包含一个google地图片段。
在活动开始时,折叠工具栏在某些情况下会自动折叠,而不会以编程方式折叠它。
我尝试使用scroll|exitUntilCollapsed|enterAlways为我的视图组合了不同的滚动标志。我也尝试过不显示google地图片段,但我仍然可以重现它。
我怎样才能阻止它自动崩溃?任何帮助都将不胜感激!
发布于 2018-10-09 16:06:22
我知道已经很晚了,但还是..
折叠工具栏在activity启动时自动折叠的原因是,在
至或
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:focusableInTouchMode="true"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
xmlns:android="http://schemas.android.com/apk/res/android">
希望它能有所帮助。:)
快乐编码..:)
https://stackoverflow.com/questions/47562957
复制相似问题