title: How can i access to LayoutInflater imageView
body: <p>This is my Object </p>
  
  <pre><code>    public Object instantiateItem(ViewGroup container, int position) {
  
          layoutInflater = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          View view = layoutInflater.inflate(R.layout.image_fullscreen_preview, container, false);
  
          ImageView imageViewPreview = (ImageView) view.findViewById(R.id.image_preview);
  
          Image image = images.get(position);
  
          Glide.with(getActivity()).load(image.getLarge())
                  .thumbnail(0.5f)
                  .crossFade()
                  .diskCacheStrategy(DiskCacheStrategy.ALL)
                  .into(imageViewPreview);
  
          container.addView(view);
  
          return view;
      }
  </code></pre>
  
  <p>And this is my onShare function.</p>
  
  <p>public void onShareItem() {
          // Get access to bitmap image from view</p>
  
  <pre><code>      ImageView  i = (ImageView) getActivity().getLayoutInflater().inflate(R.layout.image_fullscreen_preview,null).findViewById(R.id.image_preview);
  
      //imageViewPreview = (ImageView) viewPager.findViewById(R.id.image_preview);
      // Get access to the URI for the bitmap
      Uri bmpUri = getLocalBitmapUri(imageViewPreview);
      if (bmpUri != null) {
          // Construct a ShareIntent with link to image
          Intent shareIntent = new Intent();
          shareIntent.setAction(Intent.ACTION_SEND);
          shareIntent.putExtra(Intent.EXTRA_STREAM, bmpUri);
          shareIntent.setType("image/*");
          // Launch sharing dialog for image
          startActivity(Intent.createChooser(shareIntent, "Share Image"));
      } else {
          // ...sharing failed, handle error
      }
  }
  </code></pre>
  
  <p>when i debug app, imageview is null.. </p>
  
  <p>I want to share image in R.id.image_preview 
  So how can i get access to R.id.image_preview image.</p>