diff --git a/Project Files/15. Udemy Searchbar Animation/App.js b/Project Files/15. Udemy Searchbar Animation/App.js new file mode 100644 index 0000000..950d357 --- /dev/null +++ b/Project Files/15. Udemy Searchbar Animation/App.js @@ -0,0 +1,74 @@ +import React, { Component } from "react"; +import { + View, + Text, + StyleSheet, + TextInput, + FlatList, + Keyboard +} from "react-native"; + +import * as Animatable from 'react-native-animatable' + +const listItems = ['Development', 'Business', 'IT & Software', 'Office Productivity', 'Personal Development', 'Design', 'Marketing', 'LifeStyle', 'Photography', 'Health & Fitness', 'Teacher Training', 'Music'] + + +import Icon from 'react-native-vector-icons/Ionicons' +class App extends Component { + + state = { + searchBarFocused: false + } + + componentDidMount() { + this.keyboardDidShow = Keyboard.addListener('keyboardDidShow', this.keyboardDidShow) + this.keyboardWillShow = Keyboard.addListener('keyboardWillShow', this.keyboardWillShow) + this.keyboardWillHide = Keyboard.addListener('keyboardWillHide', this.keyboardWillHide) + + + } + + keyboardDidShow = () => { + this.setState({ searchBarFocused: true }) + } + + keyboardWillShow = () => { + this.setState({ searchBarFocused: true }) + } + + keyboardWillHide = () => { + this.setState({ searchBarFocused: false }) + } + render() { + return ( + + + + + + + + + + + + + {item}} + keyExtractor={(item, index) => index.toString()} + /> + + ); + } +} +export default App; + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center' + } +}); \ No newline at end of file diff --git a/Project Files/15. Udemy Searchbar Animation/app.json b/Project Files/15. Udemy Searchbar Animation/app.json new file mode 100644 index 0000000..fb01301 --- /dev/null +++ b/Project Files/15. Udemy Searchbar Animation/app.json @@ -0,0 +1,27 @@ +{ + "expo": { + "name": "udemy-ui", + "description": "This project is really great.", + "slug": "udemy-ui", + "privacy": "public", + "sdkVersion": "30.0.0", + "platforms": ["ios", "android"], + "version": "1.0.0", + "orientation": "portrait", + "icon": "./assets/icon.png", + "splash": { + "image": "./assets/splash.png", + "resizeMode": "contain", + "backgroundColor": "#ffffff" + }, + "updates": { + "fallbackToCacheTimeout": 0 + }, + "assetBundlePatterns": [ + "**/*" + ], + "ios": { + "supportsTablet": true + } + } +} diff --git a/Project Files/15. Udemy Searchbar Animation/assets/icon.png b/Project Files/15. Udemy Searchbar Animation/assets/icon.png new file mode 100644 index 0000000..3f5bbc0 Binary files /dev/null and b/Project Files/15. Udemy Searchbar Animation/assets/icon.png differ diff --git a/Project Files/15. Udemy Searchbar Animation/assets/splash.png b/Project Files/15. Udemy Searchbar Animation/assets/splash.png new file mode 100644 index 0000000..4f9ade6 Binary files /dev/null and b/Project Files/15. Udemy Searchbar Animation/assets/splash.png differ diff --git a/Project Files/15. Udemy Searchbar Animation/package.json b/Project Files/15. Udemy Searchbar Animation/package.json new file mode 100644 index 0000000..c95f2e7 --- /dev/null +++ b/Project Files/15. Udemy Searchbar Animation/package.json @@ -0,0 +1,18 @@ +{ + "name": "empty-project-template", + "main": "node_modules/expo/AppEntry.js", + "private": true, + "scripts": { + "start": "expo start", + "android": "expo start --android", + "ios": "expo start --ios", + "eject": "expo eject" + }, + "dependencies": { + "expo": "^30.0.1", + "react": "16.3.1", + "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz", + "react-native-animatable": "^1.3.0", + "react-native-vector-icons": "^6.0.2" + } +} \ No newline at end of file