Code example for Gallery

Methods: getVisibility, setVisibility

0
      if (mTouchMode == TouchMode.Drag) {
        if (Math.abs(event.getX() - mTouchStartX) < 50) {
          float diffY = event.getY() - mTouchStartY;
          Log.d("ImageViewActivity", String.format("DragLength %.2f MinLength %.2f", Math.abs(diffY), mMinDragHeight));
          if (Math.abs(diffY) > mMinDragHeight) {
            if (diffY > 0 && mGalleryThumbnails.getVisibility() == View.VISIBLE) {
              mGalleryThumbnails.setVisibility(View.GONE);
            } else if (diffY < 0 && mGalleryThumbnails.getVisibility() == View.GONE) {
              mGalleryThumbnails.setVisibility(View.VISIBLE);
            } 
          } 
        } 
      } 
      break; 
    case MotionEvent.ACTION_MOVE:
      if (mTouchMode == TouchMode.Zoom) {
        float dist = getSpacing(event);
        if (dist > 10f) {
          GalleryImageView imageView = (GalleryImageView) mGalleryFullscreen.getSelectedView();
          float scale = dist / mOldDist;
          if (scale >= 1 && scale <= 10) {