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();
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值