From a64d8e1df2d87dc8472f8af6f205419012454d79 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Sat, 6 Mar 2021 00:52:22 -0500 Subject: fix layout --- src/components/search/SearchCategories.tsx | 1 + src/components/search/SearchResultList.tsx | 5 ++++- src/components/search/SearchResultsBackground.tsx | 2 +- src/screens/search/SearchScreen.tsx | 6 +++++- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/components/search/SearchCategories.tsx b/src/components/search/SearchCategories.tsx index 3096b343..2883a541 100644 --- a/src/components/search/SearchCategories.tsx +++ b/src/components/search/SearchCategories.tsx @@ -25,6 +25,7 @@ const SearchCategories: React.FC = () => { {buttons && buttons.map((searchCategory) => ( = ({ const styles = StyleSheet.create({ container: { marginTop: SCREEN_HEIGHT * 0.02, + height: SCREEN_HEIGHT, }, sectionHeaderStyle: { width: '100%', @@ -78,7 +79,9 @@ const styles = StyleSheet.create({ marginBottom: normalize(24), backgroundColor: '#C4C4C4', }, - keyboardOpen: {marginBottom: SCREEN_HEIGHT * 0.3}, + keyboardOpen: { + marginBottom: SCREEN_HEIGHT * 0.35, + }, noResultsTextContainer: { justifyContent: 'center', flexDirection: 'row', diff --git a/src/components/search/SearchResultsBackground.tsx b/src/components/search/SearchResultsBackground.tsx index c5fcc6fb..f6f40f52 100644 --- a/src/components/search/SearchResultsBackground.tsx +++ b/src/components/search/SearchResultsBackground.tsx @@ -41,7 +41,7 @@ const styles = StyleSheet.create({ paddingBottom: SCREEN_HEIGHT / 15, }, results: { - marginTop: StatusBarHeight + 110, + marginTop: StatusBarHeight, }, }); export default SearchResultsBackground; diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx index 3b73229f..223fc2b2 100644 --- a/src/screens/search/SearchScreen.tsx +++ b/src/screens/search/SearchScreen.tsx @@ -175,8 +175,12 @@ const SearchScreen: React.FC = () => { }; const styles = StyleSheet.create({ - mainContainer: {backgroundColor: '#fff', height: SCREEN_HEIGHT}, + mainContainer: { + backgroundColor: '#fff', + height: SCREEN_HEIGHT, + }, contentContainer: { + height: SCREEN_HEIGHT * 0.9, paddingTop: '2%', paddingBottom: SCREEN_HEIGHT / 3, paddingHorizontal: '3%', -- cgit v1.2.3-70-g09d2