and7

//draglayer
import static com.android.launcher.LengthCalculate.GREEN_RECT_TOP_OFFSET;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import com.android.launcher.CellLayout.CellInfo;

  
    private static final int SCROLL_ZONE_IMG_WIDTH = 35;
    private static final float WINGS_START_VECTOR = -SCROLL_ZONE_IMG_WIDTH;
    private static final float WINGS_END_VECTOR = 0f;
    private static final float WINGS_INCREMENT = 5f;
    private static final long WINGS_SLEEP_TIME = 20; 
    private static final long  WINGS_MOVE_IN_SLEEP_TIME = WINGS_SLEEP_TIME; 
    private static final long WINGS_MOVE_OUT_SLEEP_TIME = WINGS_SLEEP_TIME * 3;
    private static boolean dragging;   
    private boolean needWingsAnimation;
    private AnimationThread transferAt;
    private int[] position = new int[2];
    private int[] cellPosition = new int[2];
    private LengthCalculate calculate = LengthCalculate.getInstance();
    private CellLayout.CellInfo dragObjectInfo;
    private CellInfo vacantCell;
    private CellLayout currentBak;
    private Matrix matrix = new Matrix();
    private Paint imgPaint = new Paint();
    private Workspace workspace;
    private GroupNavigation groupNavi;   
    private boolean changeWingsAnimationState = false;   
    private boolean haveGroupChange;
    private DragLayerAnimationThread transferAtListener = new DragLayerAnimationThread();
  
    private Context mContext = null;
    private boolean isPhoneStateListenerRegistered = false;
  

    public void startDrag(View v, DragSource source, Object dragInfo, int dragAction) {
     //...
        //...
        setDraging(true);
        vacantCell = null;
        //groupNavi.updateAllFocusGroup();
        doWingsAnimation();
        if (source instanceof Workspace) {
            dragObjectInfo = workspace.mDragInfo;
        } else {
            CellLayout.CellInfo cellInfo = new CellLayout.CellInfo();
            cellInfo.cell = v;
            cellInfo.valid = true;
            cellInfo.spanX = 1;
            cellInfo.spanY = 1;
            cellInfo.group = -1;
            cellInfo.screen = -1;
            dragObjectInfo = cellInfo;
        }
        mEnteredRegion = false;
        invalidate();
    }

你可能感兴趣的:(and7)