From 96394972ebae73cb793d07d68305d7aff7b036f9 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Thu, 16 Apr 2020 23:50:32 +0200 Subject: [PATCH] Added icon animations --- src/components/Lists/ProxiwashListItem.js | 39 +++++++++++++++++------ 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/src/components/Lists/ProxiwashListItem.js b/src/components/Lists/ProxiwashListItem.js index 4b78cfd..bbc7314 100644 --- a/src/components/Lists/ProxiwashListItem.js +++ b/src/components/Lists/ProxiwashListItem.js @@ -1,9 +1,10 @@ import * as React from 'react'; -import {Avatar, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper'; +import {ActivityIndicator, Avatar, List, ProgressBar, Surface, Text, withTheme} from 'react-native-paper'; import {StyleSheet, View} from "react-native"; import ProxiwashConstants from "../../constants/ProxiwashConstants"; import i18n from "i18n-js"; import AprilFoolsManager from "../../managers/AprilFoolsManager"; +import * as Animatable from "react-native-animatable"; type Props = { item: Object, @@ -13,6 +14,9 @@ type Props = { height: number, } +const AnimatedIcon = Animatable.createAnimatableComponent(Avatar.Icon); + + /** * Component used to display a proxiwash item, showing machine progression and state */ @@ -83,14 +87,21 @@ class ProxiwashListItem extends React.Component { : 1; const icon = props.isWatched - ? - : { - + { + isRunning + ? + : + } + )} />