I'm trying to get StatusBarView (I need it for activity shared element transition animation).
I use the following code in my activity:
View decorView = getWindow().getDecorView();
View statusBar = decorView.findViewById(android.R.id.statusBarBackground);
But statusBar is always null.
I tried this code after onCreate() and after onResume() - no effect.
What's wrong?