简体   繁体   English

Android Support Design v23滚动行为错误

[英]Android Support Design v23 scroll behaviour bug

I have the following situation: 我有以下情况:

One coordinator layout wrapping an AppbarLayout (with content inside) and the other child is a linearlayout that wraps a recycleview. 一个用于包装AppbarLayout(内部包含内容)的协调器布局,另一个用于包装recycleview的线性布局。

I add the appbar_scrolling_view_behavior to the linearlayout in order to react with the scrolls of the recycler but when it reaches the top the first child of the linearlayout sticks on the top. 我将appbar_scrolling_view_behavior添加到linearlayout中,以便与回收器的滚动进行反应,但是当到达顶部时,linearlayout的第一个子项将停留在顶部。

I achieve this, and is still working perfectly with physical devices but not in the emulator. 我实现了这一点,并且仍然可以与物理设备完美协作,但不能在仿真器中正常工作。 It was working in the emulators in the last version of the library. 它正在库的最新版本中的仿真器中运行。

What is happening now is that when I'm trying to open that view, the screen starts to shake and the log output is full of this: 现在发生的是,当我尝试打开该视图时,屏幕开始晃动,并且日志输出中充满了以下内容:

W/EGL_emulation﹕ eglSurfaceAttrib not implemented
W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xa1584320, error=EGL_SUCCESS

If I place the behavior in the recylcerview then this error is not happening but then I don't get the desired situation. 如果我将行为放在recylcerview中,则不会发生此错误,但是我没有得到所需的情况。

I will open a ticket, but does anyone faced the same situation? 我会开票,但是有人遇到同样的情况吗?

After long debugging I found that the issue is related to the theme together with using coordinator layout and app:layout_behavior="@string/appbar_scrolling_view_behavior" 经过长期调试,我发现问题与主题以及使用协调器布局和app:layout_behavior="@string/appbar_scrolling_view_behavior"

So if I set this on my theme 因此,如果我将其设置为主题

<item name="android:windowIsFloating">true</item>

With the layout on the previous comment it happens this error. 使用上一个注释的布局时,会发生此错误。

Instead of using windowsIsFloating I set it to false and I force the activity window size 而不是使用windowsIsFloating我将其设置为false,我强制活动窗口大小

getWindow().setLayout(width, height);

Then it works properly. 然后它可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 移至Android Design Support v23后,TabLayout样式无法解析@ dimen / tab_max_width - TabLayout style cannot resolve @dimen/tab_max_width after moving to Android Design Support v23 java.lang.NoClassDefFoundError:android.support.v7.widget。*自升级到支持库v23以来 - java.lang.NoClassDefFoundError: android.support.v7.widget.* since upgrading to Support Library v23 Android v23 PDFreader不断崩溃 - Android v23 PDFreader keep crashing TabLayout v23无法与ViewPager滚动一起滚动 - TabLayout v23 doesn't scroll with ViewPager scroll ADT v23 + SDK 23-Android“ L”-是否缺少Proguard? - ADT v23 + SDK 23 - Android “L” - missing Proguard? Android appcompat v21不起作用,但v23起作用 - Android appcompat v21 not work but v23 works Kuzzle V2 实时订阅 android sdk v23 - Kuzzle V2 Realtime subscription on android sdk v23 v23 之前的设备上的 Android TextView DrawableTint - Android TextView DrawableTint on pre v23 devices 跑的时候!! Android Studio 弹窗 v23 - When run!! Android Studio poup v23 android 6将无法在v23中运行(构建工具) - android 6 won't run in v23 (build-tools)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM