title: How to pass argument name in android navigation component?
body: <p>I'm using a navigation graph to navigate between fragments. Everything works fine, but I wonder how to pass argument name in an elegant way.</p>
  <p>Here is my code snippet from <code>navSheet.xml</code>:</p>
  <p>A source fragment action:</p>
  <pre><code>    &lt;action
          android:id=&quot;@+id/action_go_to_B&quot;
          app:destination=&quot;@id/id_fragment_b&quot;&gt;
          &lt;argument
              android:name=&quot;@string/fragment_b_arg_key_name&quot;
              app:argType=&quot;integer&quot;/&gt;
      &lt;/action&gt;
  </code></pre>
  <p>A destination fragment:</p>
  <pre><code>&lt;fragment
      android:id=&quot;@+id/id_fragment_b&quot;
      android:name=&quot;pl.asd.FragmentB&quot;
      tools:layout=&quot;@layout/fragment_b&quot;&gt;
  
      &lt;argument
          android:name=&quot;@string/fragment_b_arg_key_name&quot;
          app:argType=&quot;integer&quot;/&gt;
  &lt;/fragment&gt;
  </code></pre>
  <p>I store my argument key in <code>string.xml</code>:</p>
  <pre><code>&lt;string name=&quot;fragment_b_arg_key_name&quot; translatable=&quot;false&quot;&gt;arg_fragment_b&lt;/string&gt;
  </code></pre>
  <p>And at the end I try to get my argument in destination fragment:</p>
  <pre><code>    override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          arguments?.let {
              selectedId = it.getInt(getString(R.string.fragment_b_arg_key_name))
          }
      }
  </code></pre>
  <p>The problem is with <code>android:name=&quot;@string/fragment_b_arg_key_name&quot;</code>.
  I've seen on the debugger that there is an incorrect bundle key. It should be like:</p>
  <p><code>Bundle[{arg_fragment_b=-730732511}]</code></p>
  <p>but I get:</p>
  <p><code>Bundle[{@string/fragment_b_arg_key_name=-730732511}]</code></p>
  <p>Two questions:</p>
  <ol>
  <li><p>What's wrong with using a <code>@string/fragment_b_arg_key_name</code> in navSheet.xml so it not returns the content of <code>@string/fragment_b_arg_key_name</code> but raw reference.</p>
  </li>
  <li><p>How to not hard-code arguments name that I use in Fragments, <code>navSheet.xml</code> and other classes? How to store such keys in one place?</p>
  </li>
  </ol>