title: EditText with a permanent hint in Java
body: <p>I have an <code>EditText</code> with some information in it. When there is no information,
  I'm displaying a caption using <code>setHint()</code>.</p>
  
  <pre><code>final EditText info = new EditText(activity);
  if (data.getinfo() != null &amp;&amp; !data.getAddress().trim().equals("")) {
      info.setText(data.getinfo());
  } else {
      info.setHint(R.string.info);
  }
  </code></pre>
  
  <p>I want to show that caption even if the <code>EditText</code> has info, the info should be below the caption.</p>
  
  <p>I tried using <code>setText()</code>. But that didn't work either.</p>
  
  <pre><code>if (condition) {
      info.setText(R.string.info);
      info.setText(data.getinfo());
  } else {
      info.setHint(R.string.info);
  }
  </code></pre>