mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 15:26:58 +00:00
Merge "Let BubbleTextHolder extend IconLabelDotView" into tm-dev
This commit is contained in:
@@ -22,7 +22,7 @@ import com.android.launcher3.model.data.ItemInfoWithIcon;
|
||||
/**
|
||||
* Views that contain {@link BubbleTextView} should implement this interface.
|
||||
*/
|
||||
public interface BubbleTextHolder {
|
||||
public interface BubbleTextHolder extends IconLabelDotView {
|
||||
BubbleTextView getBubbleText();
|
||||
|
||||
/**
|
||||
@@ -32,4 +32,14 @@ public interface BubbleTextHolder {
|
||||
*/
|
||||
default void onItemInfoUpdated(ItemInfoWithIcon itemInfo) {
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setIconVisible(boolean visible) {
|
||||
getBubbleText().setIconVisible(visible);
|
||||
}
|
||||
|
||||
@Override
|
||||
default void setForceHideDot(boolean hide) {
|
||||
getBubbleText().setForceHideDot(hide);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,7 +587,7 @@ public class FloatingIconView extends FrameLayout implements
|
||||
view.matchPositionOf(launcher, originalView, isOpening, positionOut);
|
||||
|
||||
// We need to add it to the overlay, but keep it invisible until animation starts..
|
||||
view.setVisibility(INVISIBLE);
|
||||
setIconAndDotVisible(view, false);
|
||||
parent.addView(view);
|
||||
dragLayer.addView(view.mListenerView);
|
||||
view.mListenerView.setListener(view::fastFinish);
|
||||
@@ -596,16 +596,8 @@ public class FloatingIconView extends FrameLayout implements
|
||||
view.mEndRunnable = null;
|
||||
|
||||
if (hideOriginal) {
|
||||
if (isOpening) {
|
||||
setIconAndDotVisible(originalView, true);
|
||||
view.finish(dragLayer);
|
||||
} else {
|
||||
originalView.setVisibility(VISIBLE);
|
||||
if (originalView instanceof IconLabelDotView) {
|
||||
setIconAndDotVisible(originalView, true);
|
||||
}
|
||||
view.finish(dragLayer);
|
||||
}
|
||||
setIconAndDotVisible(originalView, true);
|
||||
view.finish(dragLayer);
|
||||
} else {
|
||||
view.finish(dragLayer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user