title: comparison of two Strings doesn't work in android
body: <p>here's my code, Eclipse doesn't show any errors, program's working fine, but it simply doesn't do exactly what i want:) </p>
  
  <pre><code>    View image_view_danger_rate = (ImageView) findViewById(R.id.origin);
      View image_view_origin = (ImageView) findViewById(R.id.danger_rate);
  
      String entry_tag = (String) descriptionResultView.findViewById(resID).getTag();
  
      String dangerous = "dangerous";
      String not_dangerous = "not_dangerous";
  
      if ( entry_tag == dangerous) {
          image_view_danger_rate.setBackgroundResource(R.drawable.attention);
      }else if ( entry_tag == not_dangerous) {
          image_view_danger_rate.setBackgroundResource(R.drawable.its_ok);
          image_view_origin.setBackgroundResource(R.drawable.artificial);
      }
  </code></pre>
  
  <p>The application should choose between two images to pop-up on the screen, depending on a tag stored in the xml file. 
  So, if the tag says "dangerous", then should be shown the "attention"-image. 
  If the tag says "not_dangerous", there should be the "its_ok"-image. </p>
  
  <p>Now, displaying the images without an if-comparison works perfectly.</p>
  
  <p>If i print out the tags as a string, it works, it prints correctly "dangerous" or "not_dangerous", depending on the tag. </p>
  
  <p>But if there's a if-comparison as shown above, nothing happens, no image is shown.</p>
  
  <p>Please anyone help!!=)</p>