title: How to call a string of multiple values ​from a ViewModel
body: <p>I am trying to call a string that accepts two values ​​from a viewmodel</p>
  <pre><code>&lt;string name=&quot;send_message&quot;&gt;Se envió %1$s a %2$s&lt;/string&gt;
  </code></pre>
  <p>with the next function</p>
  <pre><code>private fun getString(textId: Int,args: ArrayList&lt;Any&gt;) =
      getApplication&lt;Application&gt;().applicationContext?.getString(textId, args) ?: &quot;&quot;
  
      val message = getString(R.string.mystring, arrayListOf(amount,name))
  </code></pre>
  <p>But I get this error</p>
  <blockquote>
  <p>java.util.MissingFormatArgumentException: Format specifier '%2$s'</p>
  </blockquote>
  <p>Does anyone know what I'm doing wrong? I would greatly appreciate it</p>