title: Binding Adapter pass array from XML
body: <p>I have similer need, lets assume below example. I need to pass multiple fields to binding adapter. </p>
  
  <pre><code>@BindingAdapter("onClickListeners")
  public static void setClicks(View view, View.OnClickListener[] onClickListeners)
  </code></pre>
  
  <p>So in XML, can I call it like this? - </p>
  
  <pre><code>onClickListeners="@{() -&gt; handler.oneClicked(), () -&gt; handler.secondClicked()}"
  </code></pre>
  
  <p><strong>Please note</strong> - </p>
  
  <ol>
  <li>The array should be dynamic for future use. So I can not take two params in Adapter. </li>
  <li>I have multiple arrays fields so can not use <code>varargs</code>. </li>
  </ol>
  
  <p><strong>Wanna see usecase -</strong> </p>
  
  <pre><code>@BindingAdapter(value = {"fullText", "highlightTexts", "highlightEnable", "onClickListeners"}, requireAll = false)
  public static void setClickableHighLightedText(TextView tv, String fullText, String[] highlightTexts, boolean highlightEnable, View.OnClickListener[] onClickListeners) {
      tv.setText(fullText);
      if (highlightEnable) {
          for (int i = 0; i &lt; highlightTexts.length; i++) {
              String highlightText = highlightTexts[i];
              Utilities.setClickableHighLightedText(tv, highlightText, onClickListeners.length &gt; i ? onClickListeners[i] : null);
          }
      }
  }
  </code></pre>