title: Unable to change Image Resource in ImageView
body: <p>I have the following code and i am unable to change my imageview resource in my program . I have a similar code in another fragment of my program and it works perfectly. I have tried to clean build my project as suggested by other posting.</p>
  
  <p>I tried both </p>
  
  <p><code>status.setImageDrawable(getResources().getDrawable(R.drawable.login_tick));</code>
  <code>status.setImageResource(R.drawable.login_cross);</code></p>
  
  <pre><code>@Override
  public void onActivityCreated (Bundle savedInstanceState)
  {
      super.onActivityCreated(savedInstanceState);
  
      status = (ImageView)getActivity().findViewById(R.id.um_namestatus);
      registerButton = (Button) getActivity().findViewById(R.id.um_registerButton);
  
      name = (EditText) getActivity().findViewById(R.id.um_name);
  
      name.setOnFocusChangeListener(new OnFocusChangeListener() {
  
          @Override
          public void onFocusChange(View v, boolean hasFocus) {
              if (!hasFocus) {
                  status.setImageDrawable(getResources().getDrawable(R.drawable.login_tick)); 
                  test();
              }
          }
      });
  }
  
  protected void test() {
      // TODO Auto-generated method stub
      status.setImageResource(R.drawable.circle_green);
      Toast.makeText(getActivity(), "" + "//////",Toast.LENGTH_SHORT).show();
  }
  </code></pre>