title: android imageview setvisibility
body: <p>i want to change visibility of imageview if value= x</p>
  
  <p>but i have error message on eclipse.</p>
  
  <p>here is part of my java</p>
  
  <pre><code>                if (success == 1) {
                      // products found
                      // Getting Array of Products
                      products = json.getJSONArray(TAG_PRODUCTS);
  
                      // looping through All Products
                      for (int i = 0; i &lt; products.length(); i++) {
                          JSONObject c = products.getJSONObject(i);
  
                          // Storing each json item in variable
                          String id = c.getString(TAG_PID);
                          String name = c.getString(TAG_NAME);
                          String price = c.getString(TAG_PRICE);
                          String cu = c.getString(TAG_CU);
                          /////////////
                                                  ///HERE THE BUG////
                          if (cu == "1"){
  
                              cu = "oui";
                          }
                          else {  
                              ImageView image_A_wrong = (ImageView) findViewById(R.id.imageView1);
                              image_A_wrong.setVisibility(View.GONE);
  
                          }
  </code></pre>
  
  <p>and here my xml file</p>
  
  <pre><code>&lt;ImageView
          android:id="@+id/imageView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/quo100px"
          android:visibility="gone" /&gt;
  </code></pre>
  
  <p>tks advance for your help</p>