title: DataBinding: How to get resource by dynamic id?
body: <p>I know that it is possible to reference resources in layout by their resource id:</p>
  
  <pre><code>android:text="@{@string/resourceName}"
  </code></pre>
  
  <p>However, I would like to reference resource by id which is known only at runtime. As a simple example, imagine we have such model:</p>
  
  <pre><code>public class MyPOJO {
  
      public final int resourceId = R.string.helloWorld;
  
  }
  </code></pre>
  
  <p>And now I need to use this value as a value in a format string. Let's call it</p>
  
  <pre><code>&lt;string name="myFormatString"&gt;Value is: %s&lt;/string&gt;
  </code></pre>
  
  <p>The most straightforward approach does not work:</p>
  
  <pre><code>android:text="@{@string/myFormatString(myPojo.resourceId)}"
  </code></pre>
  
  <p>This will just put integer value into placeholder (also it proves that I initialized my POJO correctly, so I'm not providing whole layout here).</p>
  
  <p>I also tried using <code>@BindingConversion</code>, but it did not worked (which is actually expected, but I tried anyway) - <code>int</code> was still assigned to placeholder and binding method was not called.</p>
  
  <p>How can I explicitly get resource by it's id in DataBinding library? </p>