mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 17:36:49 +00:00
Merge changes Ib2bc8419,Ia41cb0e3,I43bfbc41 into sc-v2-dev
* changes: Animate PredictedAppIcon when its icon changes Add "wave" animation when entering taskbar edu Add slot machine animation for PredictedAppIcon
This commit is contained in:
committed by
Android (Google) Code Review
commit
2d5a8dc847
@@ -118,6 +118,7 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
*/
|
||||
protected void updateHotseatItems(ItemInfo[] hotseatItemInfos) {
|
||||
int nextViewIndex = 0;
|
||||
int numViewsAnimated = 0;
|
||||
|
||||
for (int i = 0; i < hotseatItemInfos.length; i++) {
|
||||
ItemInfo hotseatItemInfo = hotseatItemInfos[i];
|
||||
@@ -173,8 +174,14 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
// Apply the Hotseat ItemInfos, or hide the view if there is none for a given index.
|
||||
if (hotseatView instanceof BubbleTextView
|
||||
&& hotseatItemInfo instanceof WorkspaceItemInfo) {
|
||||
((BubbleTextView) hotseatView).applyFromWorkspaceItem(
|
||||
(WorkspaceItemInfo) hotseatItemInfo);
|
||||
BubbleTextView btv = (BubbleTextView) hotseatView;
|
||||
WorkspaceItemInfo workspaceInfo = (WorkspaceItemInfo) hotseatItemInfo;
|
||||
|
||||
boolean animate = btv.shouldAnimateIconChange((WorkspaceItemInfo) hotseatItemInfo);
|
||||
btv.applyFromWorkspaceItem(workspaceInfo, animate, numViewsAnimated);
|
||||
if (animate) {
|
||||
numViewsAnimated++;
|
||||
}
|
||||
}
|
||||
setClickAndLongClickListenersForIcon(hotseatView);
|
||||
nextViewIndex++;
|
||||
@@ -259,6 +266,18 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
|
||||
return mIconLayoutBounds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the app icons currently shown in the taskbar.
|
||||
*/
|
||||
public View[] getIconViews() {
|
||||
final int count = getChildCount();
|
||||
View[] icons = new View[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
icons[i] = getChildAt(i);
|
||||
}
|
||||
return icons;
|
||||
}
|
||||
|
||||
// FolderIconParent implemented methods.
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user