title: Reference string resource from code
body: <p>I have the following string declared in strings.xml:</p>
  
  <pre><code>&lt;string name="last_msg"&gt;Your last click was on&lt;/string&gt;
  </code></pre>
  
  <p>Now when someone clicks a button, I want a textview to show this string, with a space, then a variable value that is a timestamp.</p>
  
  <p>Unfortunately, using @string/last_msg isn't working, and I'm not sure how to do this properly so I'm not hardcoding in content.</p>
  
  <p>Here's my code for the onClick function:</p>
  
  <pre><code>public void showMsgNow(View view) {
      TextView lastMsg = (TextView)findViewById(R.id.textView2);
      long currentTimeStamp = System.currentTimeMillis();
      lastMsg.setText(@string/last_msg + " " + currentTimeStamp);
  }
  </code></pre>
  
  <p>I'm a newbie, any help would be great !</p>