Ejemplo n.º 1
0
 public void run() {
   if (mSelectionBounds != null) {
     mWebView.addView(mSelectionDragLayer);
     drawSelectionHandles();
     final int contentHeight =
         (int) Math.ceil(getDensityDependentValue(mWebView.getContentHeight(), mActivity));
     final int contentWidth = mWebView.getWidth();
     ViewGroup.LayoutParams layerParams = mSelectionDragLayer.getLayoutParams();
     layerParams.height = contentHeight;
     layerParams.width = Math.max(contentWidth, mContentWidth);
     mSelectionDragLayer.setLayoutParams(layerParams);
     if (mSelectionListener != null) {
       mSelectionListener.startSelection();
     }
   }
 }