Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当导航抽屉打开时,左上角的导航抽屉图标会滑动一点。我可以禁用这个小动画,让图标一直原地不动吗?
是的,你可以做到。 在您的onCreate函数中,当您创建ActionBarDrawerToggle 覆盖您的onDrawerSlide函数时,如下所示:
onCreate
ActionBarDrawerToggle
onDrawerSlide
@Override public void onDrawerSlide(View drawerView, float slideOffset) {}
删除super呼叫,您删除滑动移动。
super