Home | History | Annotate | Download | only in sgv
      1 /*
      2  * Copyright (C) 2012 Google Inc. All Rights Reserved.
      3  */
      4 
      5 package com.android.deskclock.widget.sgv;
      6 
      7 public class ReorderUtils {
      8     /**
      9      * Possible states a dragged view can be in.
     10      */
     11     public static final int ON_PICKED_UP = 0;
     12     public static final int ON_DRAG_RELEASE = 1;
     13     public static final int ON_DRAG_CANCELLED = 2;
     14 
     15     /**
     16      * Reordering area of a view in a StaggeredGridView.
     17      */
     18     public static final int REORDER_AREA_NONE = 0x0;
     19     public static final int REORDER_AREA_VALID = 0x1;
     20 
     21     /**
     22      *  Reordering states
     23      */
     24     public static final int DRAG_STATE_NONE = 0;
     25     public static final int DRAG_STATE_DRAGGING = 1;
     26     public static final int DRAG_STATE_RELEASED_REORDER= 2;
     27     public static final int DRAG_STATE_RELEASED_HOVER = 3;
     28 
     29     /**
     30      * Reordering directions allowed.  {@link #REORDER_DIRECTION_HORIZONTAL} direction means that
     31      * the user is only allowed to drag a view along the horizontal axis.  Likewise for
     32      * {@link #REORDER_DIRECTION_VERTICAL}.  These two flags can be OR'ed together to allow for
     33      * free dragging across both horizontal and vertical axes.
     34      */
     35     public static final int REORDER_DIRECTION_HORIZONTAL = 0x1;
     36     public static final int REORDER_DIRECTION_VERTICAL = 0x2;
     37 }
     38