Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e0484bf authored by Tony Wickham's avatar Tony Wickham
Browse files

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
parent 497a6ad8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment