1

I'm following a tutorial where a guy calls xxxx.syncState() from within the onPostCreate() method. His app works just fine -- it starts with hamburger icon, which turns into arrow icon. On my side, the icon is arrow all the time but the drawer works.

If I move this xxxx.syncState() call above, to the onCreate() method (just before its end) -- the behaviour is as expected.

Can anyone tell why is this happening, because I suspect the correct way of doing this is to have it under onPostCreate() method? Is android full of things that often need to be done (slightly) differently, creating confusion among novice developers, or there are good reasons due to different versions, etc.?

[SOLVED] This solved my problem: Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in onPostCreate work?

Community
  • 1
  • 1
developer10
  • 1,450
  • 2
  • 15
  • 31

0 Answers0