title: refresh fragment UI from fragmentActivity
body: <p>I want to change a ImageView in fragment(that create in code), from FragmentActivity. (there is no fragment and tag in XML).</p>
  
  <p>MainActivity that extends from FragmentActivity and implements from GooglePlayServicesClient.ConnectionCallbacks:</p>
  
  <pre><code>...
  FragmentAdapter mAdapter;
  ViewPager mPager;
  ...
  
  public void onCreate(Bundle savedInstanceState){
      ...
      FragmentManager fm = getSupportFragmentManager();
      mAdapter = new FragmentAdapter(fm);
      mPager.setAdapter(mAdapter);
      ...}
  
  @Override
  public void onConnected(Bundle connectionHint){
  //*** I want to change a ImageView on Fragment1 here
  }
  </code></pre>
  
  <p>FragmentAdapter that extends from FragmentPagerAdapter:</p>
  
  <pre><code>...
  private FragmentManager mFragmentManager;
  
  public FragmentAdapter(FragmentManager fm){
      super(fm);
  }
  
  @Override
  public Fragment getItem(int pos){
  // String name = makeFragmentName(R.id.mainPager, pos);
  // Fragment fragmentObject = mFragmentManager.findFragmentByTag(name);
  Fragment fragmentObject = null;
  
  switch(pos){
      case 0:
          fragmentObject = new Fragment1();
          break;
      ...
  }
  
  return fragmentObject;
  }
  ...
  
  //private static String makeFragmentName(int viewId, iont index){
      //return "android:switcher:" + viewId + ":" + index;
  //}
  </code></pre>
  
  <p>According to <a href="https://stackoverflow.com/questions/18486952/get-id-of-textview-in-fragment-from-fragmentactivity-in-viewpager">this</a> topic for change a element in fragment, from fragmentActivity:</p>
  
  <p>Fragment1 that extends from Fragment:</p>
  
  <pre><code>private ImageView IMGThisImageShouldChange = null;
  
  public View onCreateView(...){
      IMGThisImageShouldChange = (ImageView)v.findViewById(R.id.TargetImage);
      ...
  }
  
  public void changeImageView(int resourceId){
      IMGThisImageShouldChange.setImageResource(resouirceId);
  }
  </code></pre>
  
  <p>A comment line in this topic says:</p>
  
  <blockquote>
    <p>//Do not create new object each time you set text. Use the same
    fragment object which you use for view pager.</p>
  </blockquote>
  
  <p>So how can i access to fragmentObject from MainActivity, to call changeImageView method?</p>
  
  <p>If i should find fragment via tag, according to <a href="https://stackoverflow.com/questions/6374170/how-to-set-a-fragment-tag-by-code">this</a> topic, where i should set tag and how to find?</p>