mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Prevent flicker when starting a drag.
Also, animate item the view to its new position when dragging.
This commit is contained in:
@@ -320,6 +320,13 @@ public class DragController {
|
||||
DragView dragView = mDragView = new DragView(mContext, b, registrationX, registrationY,
|
||||
textureLeft, textureTop, textureWidth, textureHeight);
|
||||
|
||||
final DragSource dragSource = source;
|
||||
dragView.setOnDrawRunnable(new Runnable() {
|
||||
public void run() {
|
||||
dragSource.onDragViewVisible();
|
||||
};
|
||||
});
|
||||
|
||||
if (dragRegion != null) {
|
||||
dragView.setDragRegion(dragRegionLeft, dragRegion.top,
|
||||
dragRegion.right - dragRegionLeft, dragRegion.bottom - dragRegionTop);
|
||||
|
||||
Reference in New Issue
Block a user