From 558218d577c7a96d4229d97272534725c6ac27b0 Mon Sep 17 00:00:00 2001 From: Tim Glasgow Date: Mon, 1 Aug 2022 00:27:01 -0500 Subject: [PATCH] Basic animated view --- squarenotsquare/src/screens/Splash.js | 47 ++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/squarenotsquare/src/screens/Splash.js b/squarenotsquare/src/screens/Splash.js index fa261a7..53113a9 100644 --- a/squarenotsquare/src/screens/Splash.js +++ b/squarenotsquare/src/screens/Splash.js @@ -1,12 +1,51 @@ import React from "react"; -import { Text, View } from "react-native"; -import { useState } from "react"; +import { Animated, Easing, Text, View } from "react-native"; +import { useEffect, useState } from "react"; +import { styles } from './styles/AppStyles'; +import MaterialIcon from 'react-native-vector-icons/MaterialCommunityIcons'; +import Icons from '../themes/Icons'; +import Colors from "../themes/Colors"; +import Metrics from "../themes/Metrics"; +const spinValue = new Animated.Value(0); function Splash(props){ + useEffect(() => { + Animated.loop( + Animated.timing(spinValue, { + toValue: 1, + duration: 3000, + easing: Easing.linear, + useNativeDriver: true, + })).start(); + }, []); + + const spin = spinValue.interpolate({ + inputRange: [0, 1], + outputRange: ['0deg', '360deg'], + }); + return ( - - test + + + + Square Not Square + + + + + Loading... + + + + + + + ); }