mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Refactor / Cleanup / Simplify a bunch of dnd related rendering / animation
Addresses: => Fix folder icon drop location mapping (was very far off) => Fix BubbleTextView drop animation shifted by a few pixels => Get rid multiple unnecessary calls to setDragMode(none), was breaking some of the reorder flow; still some issues to address here. => Fix folder icon parallax (didn't work when the folder had a dot) Test: manual Change-Id: I5959cf341996f75d30212353ec096ed25bf40ea5
This commit is contained in:
@@ -24,12 +24,15 @@ import android.view.View;
|
||||
import android.view.ViewDebug;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.android.launcher3.dragndrop.DraggableView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Extension of AppWidgetHostView with support for controlled keyboard navigation.
|
||||
*/
|
||||
public abstract class NavigableAppWidgetHostView extends AppWidgetHostView {
|
||||
public abstract class NavigableAppWidgetHostView extends AppWidgetHostView
|
||||
implements DraggableView {
|
||||
|
||||
@ViewDebug.ExportedProperty(category = "launcher")
|
||||
private boolean mChildrenFocused;
|
||||
@@ -133,4 +136,14 @@ public abstract class NavigableAppWidgetHostView extends AppWidgetHostView {
|
||||
// The host view's background changes when selected, to indicate the focus is inside.
|
||||
setSelected(childIsFocused);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getViewType() {
|
||||
return DRAGGABLE_WIDGET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getVisualDragBounds(Rect bounds) {
|
||||
bounds.set(0, 0 , getMeasuredWidth(), getMeasuredHeight());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user