//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();
}
分享到:
相关推荐
centos7.x/rhel7.x下升级openssh到openssh8.5p1,一键升级脚本
Designing And Implementing Linux Firewalls And Qos Using Netfilter, Iproute2, Nat, And l7-Filter; Packt Publishing.pdf
Big Java, Fourth Edition Compatible with Java 5, 6, and 7 by Cay Horstmann, Wiley 2010
Big Java, Fourth Edition Compatible with Java 5, 6, and 7 by Cay Horstmann, Wiley 2010
Chapter 7 Error and Exception Handling Part II: Using MySQL Chapter 8 Designing Your Web Database Chapter 9 Creating Your Web Database Chapter 10 Working with Your MySQL Database Chapter 11 Accessing...
Chapters 1 through 7, discusses the mathematical foundation and design tools that address the digital nature of computers. The discussion begins in Chapters 1, 2, and 3 where the reader is introduced ...
Chapters 6 and 7 focus on modeling and simulation of Water Distribution Networks. Simulation was also applied to study wide area protection for interconnected power grids (Chapter 8) and performance ...
Strand7 API实用程序和模板的集合 从任何地方运行init.m脚本以将所有文件添加到matlab搜索路径 设置 要使Stran7 API正常工作,您需要安装Stran7(已配置许可证)和32位版本的Matlab。 Matlab-新版本的Matlab不需要...
Professional C# 7 and .NET Core 2.0 By 作者: Christian Nagel ISBN-10 书号: 1119449278 ISBN-13 书号: 9781119449270 Edition 版本: 7 出版日期: 2018-04-17 pages 页数: 2342 The professional’s guide to C#...
between 3 and 7 percent?and rising. The condition is often complicated by other risk factors such as obesity and heart disease.The Textbook of Diabetes and Pregnancy presents a comprehensive review of...
C# 7 and .NET Core: Modern Cross-Platform Development - Second Edition by Mark J. Price English | 24 Mar. 2017 | ASIN: B01N8UG78Q | 594 Pages | AZW3 | 23.26 MB Modern Cross-Platform Development ...
Chapter 7: Understanding Structured Exception Handling Chapter 8: Working with Interfaces Part IV: Advanced C# Programming Chapter 9: Collections and Generics Chapter 10: Delegates, Events, and ...
RhinoCommon and Grasshopper templates for Rhino 7
从"worldx7x_AndServer安卓_AndServersource_zip"的描述来看,我们可以获得AndServer的源代码。这为我们提供了深入了解其内部机制和优化服务器性能的机会。通过阅读源代码,开发者可以学习到如何实现一个轻量级的...
Enviro - The complete dynamic AAA sky and weather solution! Very easy setup: The new manager component makes it easy as possible to setup enviro in your scenes. Includes Enviro Lite! This version...
C# 7 and .NET Core Cookbook by Dirk Strauss English | 25 Apr. 2017 | ASIN: B01N6QN9ZD | 628 Pages | AZW3 | 15.51 MB Key Features Easy-to-follow recipes to get you up-and-running with the new ...
Lecture 7 Orthogonal Filter Banks: Paraunitary Matrices Orthogonality Condition (Condition O) in the Time Domain, Modulation Domain and Polyphase Domain Lecture 8 Maxflat Filters: Daubechies and Meyer...