title: About WebView in RecyclerView?
body: <p>I use the WebView in the first item of RecyclerView, webview load the url include <code>image</code> or <code>video</code>, when i click the <code>image</code> or the <code>video</code>, recyclerview will scroll to the top and webview will continue to load, video will play, how i resolve it?</p>
  
  <p>some code:</p>
  
  <pre><code>public class NewsDetailAdapter extends PageRecyclerAdapter&lt;NewsDetailInfo, ViewHolder&gt; {
  private static final boolean DEBUG = true;
  
  public static final int VIEW_TYPE_WEB                = 1;
  public static final int VIEW_TYPE_COMMENT_TITLE      = 2;
  public static final int VIEW_TYPE_COMMENT            = 3;
  
  private XWebView mWebView;
  private OnItemClickListener mItemClickListener;
  
  public NewsDetailAdapter(Context context, XWebView webView, List&lt;NewsDetailInfo&gt; data, OnItemClickListener listener, OnErrorClickListener errorListener) {
      super(context, data, errorListener);
      mWebView = webView;
      mItemClickListener = listener;
  }
  
  @Override
  public int getListItemViewType(int position) {
      return getItem(position).itemType;
  }
  
  @Override
  public ViewHolder onCreateHolder(LayoutInflater inflater, ViewGroup parent,
          int viewType) {
      switch (viewType) {
      case VIEW_TYPE_WEB:
          return new WebViewHolder(inflater.inflate(R.layout.layout_webview, parent, false));
      case VIEW_TYPE_COMMENT_TITLE:
          return new SimpleTextHolder(inflater.inflate(R.layout.layout_comment_title, parent, false));
      case VIEW_TYPE_COMMENT:
          return new ListItemHolder(inflater.inflate(R.layout.list_item_comment, parent, false));
      }
      return null;
  }
  
  @Override
  public void onBindHolder(ViewHolder viewHolder, final int position) {
      if (viewHolder instanceof SimpleTextHolder) {
          SimpleTextHolder holder = (SimpleTextHolder) viewHolder;
          holder.mText.setText(getItem(position).text);
      } else if (viewHolder instanceof ListItemHolder) {
          ListItemHolder holder = (ListItemHolder) viewHolder;
          holder.mUsername.setText(TextUtils.isEmpty(getItem(position).user.username) ? "匿名" : getItem(position).user.username);
          holder.mCommentContent.setText(getItem(position).content);
          holder.mPublishTime.setText(TimeUtils.parseToHumnanizeTime(getItem(position).publishTime));
  
          holder.itemView.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  if (mItemClickListener != null) {
                      mItemClickListener.onItemClick(getItem(position));
                  }
              }
          });
      }
  }
  
  class WebViewHolder extends ViewHolder {
  
      public WebViewHolder(View itemView) {
          super(itemView);
          FrameLayout frameLayout = (FrameLayout) itemView.findViewById(R.id.web_view_container);
          frameLayout.addView(mWebView);
          **itemView.requestFocus();**  // add this code will resolve it;
      }
  }
  
  class SimpleTextHolder extends ViewHolder {
  
      TextView mText;
  
      public SimpleTextHolder(View itemView) {
          super(itemView);
          mText = (TextView) itemView.findViewById(R.id.title);
      }
  
  }
  
  class ListItemHolder extends ViewHolder {
      ImageView mImageView;
      TextView mUsername;
      TextView mCommentContent;
      TextView mPublishTime;
  
      public ListItemHolder(View itemView) {
          super(itemView);
          mImageView = (ImageView) itemView.findViewById(R.id.portrait);
          mUsername = (TextView) itemView.findViewById(R.id.username);
          mCommentContent = (TextView) itemView.findViewById(R.id.comment_content);
          mPublishTime = (TextView) itemView.findViewById(R.id.publish_time);
      }
  }
  
  public interface OnItemClickListener {
      void onItemClick(NewsDetailInfo info);
  }
  </code></pre>
  
  <p>}</p>