3

I need a StatusBar view to put it as shared element, but statusBar is always null:

View statusBarBackground = getWindow().getDecorView().findViewById(android.R.id.statusBarBackground);

How to get StatusBar view? Does it matter that the root layout of Activity is DrawerLayout?

bojan
  • 1,269
  • 2
  • 9
  • 13
  • https://stackoverflow.com/questions/26600263/how-do-i-prevent-the-status-bar-and-navigation-bar-from-animating-during-an-acti – AskNilesh Mar 26 '18 at 06:32
  • i saw that answer and its help for blinking statusbar and navigationbar,but shared element steel go on top over statusbar and navigationbar when clicked,so i need put status and navigationbar as shared elements,and i get navigationbar view with no problem,but status bar is always null – bojan Mar 26 '18 at 06:40
  • Where from do you execute that code? – azizbekian Mar 27 '18 at 09:40
  • I execute this code in MainActivity onCreate() – bojan Mar 27 '18 at 10:47

0 Answers0