Code example for PopupWindow

Methods: dismissisShowing

0
        mSelectedString = null;
        mSelectedIndex = -1;
        invalidate();
        Arrays.fill(mWordWidth, 0);
        Arrays.fill(mWordX, 0);
        if (mPreviewPopup.isShowing()) {
            mPreviewPopup.dismiss();
        } 
    } 
     
    @Override 
    public boolean onTouchEvent(MotionEvent me) {
 
        if (mGestureDetector.onTouchEvent(me)) {
            return true; 
        } 
 
        int action = me.getAction();
        int x = (int) me.getX();
        int y = (int) me.getY();
        mTouchX = x;