Bug in lib support V7 with startSupportActionMode

∥☆過路亽.° 提交于 2019-12-11 19:25:53

问题


In a ActionBarActivity (lib support V7), when i call startSupportActionMode() from my nexus 4 (4.3), in callback, i have a double call to onPrepareActionMode() because the onDestroyActionMode is also called.

In other terms, the bug is:

1 > startSupportActionMode(callback); 2 > callback.onPrepareActionMode() is triggered 3 > callback.onDestroyActionMode() is triggered (not by me, not normal) 4 > callback.onPrepareActionMode() is triggered

The good result must be: 1 > startSupportActionMode(callback); 2 > callback.onPrepareActionMode() is triggered and only if i call actionmode.finish(), callback.onDestroyActionMode() is triggered

if I use startActionMode() (native api version), no problem...

i've create an issue on b.android.com and there is an exemple project. https://code.google.com/p/android/issues/detail?id=59714


回答1:


this is a known issue and will be fixed in the next release of AppCompat

https://code.google.com/p/android/issues/detail?id=58321



来源:https://stackoverflow.com/questions/18632206/bug-in-lib-support-v7-with-startsupportactionmode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!