title: Kotlin - Issue in converting Kotlin method to java for LayerDrawable
body: <p>Below is the converted java function from Kotlin code funcion.</p>
  
  <pre><code>@RequiresApi(api = Build.VERSION_CODES.M)
  public void setWhiteNavigationBar(@NonNull Dialog dialog) {
      Window window = dialog.getWindow();
      if (window != null) {
          DisplayMetrics metrics = new DisplayMetrics();
          window.getWindowManager().getDefaultDisplay().getMetrics(metrics);
  
          GradientDrawable dimDrawable = new GradientDrawable();
          GradientDrawable navigationBarDrawable = new GradientDrawable();
          navigationBarDrawable.setShape(GradientDrawable.RECTANGLE);
          navigationBarDrawable.setColor(Color.WHITE);
  
          val layers = arrayOf&lt;Drawable&gt;(dimDrawable, navigationBarDrawable)
  
          LayerDrawable windowBackground = new LayerDrawable(layers);
          windowBackground.setLayerInsetTop(1, metrics.heightPixels);
  
          window.setBackgroundDrawable(windowBackground);
      }
  }
  </code></pre>
  
  <p>I have trouble for the below line inside that fucntion.
  I am confused how can I write below kotlin line in Java : </p>
  
  <pre><code>val layers = arrayOf&lt;Drawable&gt;(dimDrawable, navigationBarDrawable)
  </code></pre>
  
  <p>So, Anyone please guide how can we write this line in java ?</p>
  
  <p>Thanks.</p>