public void setWorkspace(Workspace workspace) {
this.workspace = workspace;
}
public void setGroupNavi(GroupNavigation groupNavi) {
this.groupNavi = groupNavi;
}
public static boolean isDragging() {
return dragging;
}
public void doWingsAnimation() {
needWingsAnimation = true;
}
public void doNotWingsAnimation() {
needWingsAnimation = false;
}
public void snap2ScreenWings() {
haveGroupChange = false;
doWingsAnimation();
}
public void snap2GroupWings() {
transferAtListener.clearAnimationState();
haveGroupChange = true;
changeWingsAnimationState = true;
doWingsAnimation();
}
private static void setDraging(boolean flag) {
dragging = flag;
}
private void findCellPoint(DropTarget dropTarget, int[] coordinates, float x, float y) {
if (mDragging && dragObjectInfo != null && dropTarget != null) {
try {
CellLayout current = (CellLayout) workspace.getCurrentCellLayout();
if (current != null) {
if (dropTarget instanceof FolderIcon && !(dropTarget instanceof LiveFolderIcon)
&& dragObjectInfo.spanX == 1 && dragObjectInfo.spanY == 1
&& !(dragObjectInfo.cell instanceof FolderIcon)) {
current.pointToCellExact(coordinates[0], coordinates[1], cellPosition);
} else {
if (current != currentBak || vacantCell == null) {
vacantCell = current.findAllVacantCells(null, mOriginator);
currentBak = current;
}
if (dropTarget.getClass().equals(groupNavi.getChildAt(0).getClass())) {
if (dragObjectInfo.group == -1 || dragObjectInfo.group != workspace.getCurrentGroup()) {
int[] cellXY = new int[2];
if (current.getAvailableCell(cellXY, dragObjectInfo.spanX, dragObjectInfo.spanY)) {
cellPosition = cellXY;
} else {
cellPosition = null;
}
} else {
cellPosition = new int[2];
cellPosition[0] = dragObjectInfo.cellX;
cellPosition[1] = dragObjectInfo.cellY;
}
} else {
cellPosition = current.findNearestVacantArea((int) (x - mTouchOffsetX),
(int) (y - mTouchOffsetY), dragObjectInfo.spanX, dragObjectInfo.spanY, vacantCell,
null);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
分享到:
相关推荐
Oracle Database Architecture 9i and 10g Programming Techniques and Solutions
Expert Oracle Database Architecture 9i and 10g Programming Techniques and Solutions - Source Code
guidelines and practical implementation details on Oracle features and functions. For example, Oracle has a really neat feature called parallel execution. The Oracle documentation tells you how to use...
oracle expert one on one 9i 10g
2To10And10To2.py
SQLT Tool for 12c, 11g and 10g
东南大学物理化学考研真题08-10真题and10答案 ,这是花了不少钱买的,希望对大家有用
Oracle High Performance Tuning for 9i and 10g(CHM Part1~Part2)
Oracle High Performance Tuning for 9i and 10g.chm
Oracle High Performance Tuning for 9i and 10g(CHM Part1~Part2)
Ch6&7 (or ch 9 and 10) Lab exercises.doc
ANSI B18.16.3M - Property Class 5 and 10 - Metric M12 x 1.75 金属类型.prt
Expert Oracle Database Architecture 9i and 10g Programming Techniques and Solutions Thomas Kyte
Chapters 9 and 10 walk through the basics of testing and deploying web applications using open-source tools. The book concludes with the development of an application framework along with a complete ...
Thomas Kyte的三本大作part1(因上传限制分成2部分): Effective Oracle by Design Expert One-on-One Oracle Apress expert oracle database architecture 9i and 10g
Thomas Kyte的三本大作part2(因上传限制分成2部分): Effective Oracle by Design & Expert One-on-One Oracle & Apress expert oracle database architecture 9i and 10g
great book about oracle architecture and SQL engine anatomy
将Windows纸牌游戏完美移植到WinCE
Features updated coverage of multimedia, Gigabit and 10 Gbps Ethernet, WiFi/IEEE 802.11 wireless LANs, security, and much more. Ideal for professional reference or self-study. For Product Development...