title: Two exact same apps, but one works, the other one doesn´t
body: <p>I have a demo app -where I figure out how to wright the code for my real app- and the real app.
  I want an <code>ImageView</code> called <code>deck</code> in the demo and <code>deck1</code> in the real app to be replaced by a different drawable under certain conditions.
  In both apps these conditions are fulfilled, but in my demo app the Image changes and in my real app it doesn't. Also in both apps the exact same drawable is in my Drawable Files (Yes, in both app folders).</p>
  <p>Code demo app:</p>
  <pre><code>deck = b.findViewById(R.id.imageView);
          deck.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  final String standardWert= &quot;Radler&quot;;
                  Bundle karteAusgewähltFinal = getArguments();
                  final String radlerWert = karteAusgewähltFinal.getString(&quot;2&quot;);
                      if (radlerWert == standardWert) {
                          deck.setBackgroundResource(R.drawable.radler_klein_level_1);}
                      else {
  
                      };}
                  }
              );
  
          return b;
      }
  }
  </code></pre>
  <p>and real app:</p>
  <pre><code>deck1 = v.findViewById(R.id.deck_karte_1);
          deck1.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  final String wertIfCardIsChoosed = &quot;Radler&quot;;
                  Bundle karteAusgewähltFinal = getArguments();
                  final String radlerWert = karteAusgewähltFinal.getString(&quot;2&quot;);
                      if (radlerWert == wertIfCardIsChoosed) {
                          deck1.setBackgroundResource(R.drawable.radler_klein_level_1);}
                      else {
  
                      };}
          });
  
          return v;
  
      }
  }
  
  </code></pre>
  <p>My debugger also shows that the condition is fulfilled <a href="https://i.stack.imgur.com/RiHzV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RiHzV.png" alt="enter image description here" /></a></p>
  <p>I don´t know what's the difference between these apps, maybe you can find the reason, I would be really happy since I am trying to figure that out for the past 5 hours.</p>
  <p>Edit: XML file Real App:</p>
  <pre><code>&lt;ImageView
              android:id=&quot;@+id/deck_karte_1&quot;
              android:layout_width=&quot;102dp&quot;
              android:layout_height=&quot;102dp&quot;
              android:clickable=&quot;true&quot;
              android:adjustViewBounds=&quot;true&quot;
              app:layout_constraintBottom_toBottomOf=&quot;@+id/deck_karte_1_hintergund&quot;
              app:layout_constraintEnd_toEndOf=&quot;@+id/deck_karte_1_hintergund&quot;
              app:layout_constraintStart_toStartOf=&quot;@+id/deck_karte_1_hintergund&quot;
              app:layout_constraintTop_toTopOf=&quot;@+id/deck_karte_1_hintergund&quot;
              app:srcCompat=&quot;@drawable/buttondeckcardclick&quot; /&gt;
  </code></pre>
  <p>XML file demo App:</p>
  <pre><code>&lt;ImageView
              android:id=&quot;@+id/imageView&quot;
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;358dp&quot;
              android:background=&quot;@drawable/deck_karten_hintergrund&quot;
              android:clickable=&quot;true&quot;
              app:layout_constraintEnd_toEndOf=&quot;parent&quot;
              app:layout_constraintHorizontal_bias=&quot;0.5&quot;
              app:layout_constraintStart_toStartOf=&quot;parent&quot;
              app:layout_constraintTop_toTopOf=&quot;parent&quot; /&gt;
  </code></pre>