title: NoSuchMethodError when using setNavigationBarDividerColor()?
body: <p>I was trying to create a divider between the navigation bar and my app content when they are the same colour, the way that Google has been doing it with their latest Material Design 2.0 updates to their apps like Google Contacts and Google Home. I tried to do it like this:</p>
  
  <p><code>getWindow().setNavigationBarDividerColor(Color.GRAY);</code></p>
  
  <p>However, I get a <code>NoSuchMethodError</code> when trying.</p>
  
  <p>I am trying to find s a way to fix this or another way of putting a divider above the navigation bar.</p>
  
  <p>Here is the stack:</p>
  
  <pre><code>10-16 20:33:47.257 30336-30336/? E/AndroidRuntime: FATAL EXCEPTION: main
          Process: com.diamonddevelopment.scholarly, PID: 30336
          java.lang.NoSuchMethodError: No virtual method setNavigationBarDividerColor(I)V in class Landroid/view/Window; or its super classes (declaration of 'android.view.Window' appears in /system/framework/framework.jar!classes2.dex)
              at com.diamonddevelopment.scholarly.base.BaseActivity.styleNavBar(BaseActivity.java:101)
              at com.diamonddevelopment.scholarly.base.BaseActivity.setToolbars(BaseActivity.java:78)
              at com.diamonddevelopment.scholarly.fragments.TimetableFragment.onCreateView(TimetableFragment.java:79)
              at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
              at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
              at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
              at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
              at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:802)
              at androidx.fragment.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
              at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
              at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
              at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
              at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3273)
              at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3229)
              at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
              at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:620)
              at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
              at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1413)
              at android.app.Activity.performStart(Activity.java:7061)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2874)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989)
              at android.app.ActivityThread.-wrap11(Unknown Source:0)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
              at android.os.Handler.dispatchMessage(Handler.java:106)
              at android.os.Looper.loop(Looper.java:164)
              at android.app.ActivityThread.main(ActivityThread.java:6753)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
  </code></pre>