Add slot machine animation for PredictedAppIcon
PredictedAppIcon has the ability to create a "slot machine" animation which cycles through given icons and settles back on the original icon. Currently the animation isn't used, but here's how you could start it: if (view instanceof PredictedAppIcon) { List<BitmapInfo> randomIcons = mLauncher.getAppsView().getAppsStore().getApps() .stream() .map(appInfo -> appInfo.bitmap) .sorted(Utilities.getRandomComparator()) .limit(3) .collect(Collectors.toList()); ((PredictedAppIcon) view).createSlotMachineAnim(randomIcons) .setDuration(1000).start(); } Test: Played the animation locally Bug: 180605356 Change-Id: I43bfbc41256fb99ee9df3732fd493e6b96bde7cb
Loading
Please register or sign in to comment