Skip to content

Commit

Permalink
Fix Settings card lists android
Browse files Browse the repository at this point in the history
  • Loading branch information
theboi committed Mar 16, 2020
1 parent c534e56 commit 0b83780
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 85 deletions.
12 changes: 10 additions & 2 deletions ios/lost.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,12 @@
};
2D02E47A1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 66HB97DLV4;
ProvisioningStyle = Automatic;
};
2D02E48F1E0B4A5D006451C7 = {
CreatedOnToolsVersion = 8.2.1;
DevelopmentTeam = 66HB97DLV4;
ProvisioningStyle = Automatic;
TestTargetID = 2D02E47A1E0B4A5D006451C7;
};
Expand Down Expand Up @@ -635,6 +637,7 @@
baseConfigurationReference = CC84885D332AE50C2D0C8EA8 /* Pods-lostTests.debug.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
Expand All @@ -658,6 +661,7 @@
baseConfigurationReference = ADC5F6C3B9286FA673716C6F /* Pods-lostTests.release.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
COPY_PHASE_STRIP = NO;
INFOPLIST_FILE = lostTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
Expand Down Expand Up @@ -725,6 +729,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 66HB97DLV4;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "lost-tvOS/Info.plist";
Expand All @@ -734,7 +739,7 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.lost-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.ryanthe.lostapp-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
Expand All @@ -754,6 +759,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 66HB97DLV4;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "lost-tvOS/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -762,7 +768,7 @@
"-ObjC",
"-lc++",
);
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.lost-tvOS";
PRODUCT_BUNDLE_IDENTIFIER = "com.ryanthe.lostapp-tvOS";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
Expand All @@ -780,6 +786,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 66HB97DLV4;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "lost-tvOSTests/Info.plist";
Expand Down Expand Up @@ -808,6 +815,7 @@
CLANG_WARN_SUSPICIOUS_MOVE = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 66HB97DLV4;
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = "lost-tvOSTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down
4 changes: 2 additions & 2 deletions src/components/Page/PageHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export const PageHeader = (props: {theme: any, title: string}) => {
style={{
flexDirection: 'row',
alignItems: 'center',
paddingTop: 536,
paddingTop: 800+36,
marginBottom: 5,
marginTop: -500,
marginTop: -800,
backgroundColor: themeColor.linkBG
}}>
<StatusBar barStyle={props.theme === 'dark' ? 'light-content' : 'dark-content'}/>
Expand Down
40 changes: 0 additions & 40 deletions src/components/Page/PageList/index.tsx

This file was deleted.

22 changes: 16 additions & 6 deletions src/components/Shadow/View/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
import React from 'react';
import {ViewStyle, View} from 'react-native';
import {ViewStyle, View, Platform} from 'react-native';

import {K} from '../../../store/constants';
export function ViewShadow(props: {
theme: string;
intensity?: number;
children?: React.ReactNode;
style?: ViewStyle;
}) {
const themeColor = props.theme === 'dark' ? K.color.dark : K.color.light;

return (
<View
style={{
elevation: (props.intensity || 2) * 5,
shadowColor: props.theme === 'dark' ? 'black' : 'grey',
shadowOffset: {width: 0, height: 0},
shadowOpacity: 0.5,
shadowRadius: (props.intensity || 1) * 3,
...Platform.select({
android: {
elevation: (props.intensity || 2) * 5,
backgroundColor: themeColor.secondaryBG,
},
ios: {
shadowColor: props.theme === 'dark' ? 'black' : 'grey',
shadowOffset: {width: 0, height: 0},
shadowOpacity: 0.5,
shadowRadius: (props.intensity || 1) * 3,
},
}),
...props.style,
}}>
{props.children}
Expand Down
14 changes: 6 additions & 8 deletions src/pages/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ import {ViewShadow} from '../../components/Shadow/View';
const HomePageC = (props: any) => {
return (
<Layout style={{height: '100%'}}>
<PageList title="Home" theme={props.theme}>
<ViewShadow theme={props.theme} style={{height: 100, backgroundColor: "#E41C1C", borderRadius: 20 }}>
<Layout style={{backgroundColor: 'transparent'}}>
<Text onPress={() => {
console.log('call')
return phonecall('+6590022610', true)
}}>Hello</Text>
<PageHeader title="Home" theme={props.theme} />
<Layout style={{marginHorizontal: 20}}>
<ViewShadow theme={props.theme} style={{marginTop: -20}}>
<Layout style={{overflow: 'hidden', borderRadius: 20}}>
<Text>Home</Text>
</Layout>
</ViewShadow>
</PageList>
</Layout>
</Layout>
);
};
Expand Down
60 changes: 33 additions & 27 deletions src/pages/Settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import {ScrollView} from 'react-native';
import {Layout, Text, List, ListItem} from '@ui-kitten/components';
import {connect} from 'react-redux';

import {PageList} from '../../components/Page/PageList';
import {PageHeader} from '../../components/Page/PageHeader';
import {ViewShadow} from '../../components/Shadow/View';

Expand Down Expand Up @@ -35,33 +35,39 @@ const SettingsPageC = (props: any) => {
},
];

const renderItem = ({item, index}) => (
<ListItem
title={`${item.title}`}
onPress={item.onPress}
style={{height: 50}}
/>
);
const renderItem = ({item, index}) => {
return (
<ListItem
title={`${item.title}`}
onPress={item.onPress}
style={{height: 50}}
/>
);
};

return (
<Layout style={{height: '100%'}}>
<PageList title={"Settings"} theme={props.theme}>
<ViewShadow theme={props.theme} style={{height: 100}}>
<List
data={list1}
renderItem={renderItem}
scrollEnabled={false}
style={{borderRadius: 20}}
/>
</ViewShadow>
<ViewShadow theme={props.theme} style={{height: 150, marginTop: 20}}>
<List
data={list2}
renderItem={renderItem}
scrollEnabled={false}
style={{borderRadius: 20}}
/>
</ViewShadow>
</PageList>
<Layout style={{height: '100%', flex: 1}}>
<ScrollView>
<PageHeader title="Settings" theme={props.theme} />
<Layout style={{marginHorizontal: 20}}>
<ViewShadow theme={props.theme} style={{height: 100, marginTop: -20}}>
<List
data={list1}
renderItem={renderItem}
scrollEnabled={false}
style={{borderRadius: 20, overflow: 'hidden'}}
/>
</ViewShadow>
<ViewShadow theme={props.theme} style={{height: 150, marginTop: 20, marginBottom: 20}}>
<List
data={list2}
renderItem={renderItem}
scrollEnabled={false}
style={{overflow: 'hidden', borderRadius: 20}}
/>
</ViewShadow>
</Layout>
</ScrollView>
</Layout>
);
};
Expand Down

0 comments on commit 0b83780

Please sign in to comment.