Skip to content

Commit 8fb3387

Browse files
author
Karteek Rakshit
committed
first commit
0 parents  commit 8fb3387

File tree

68 files changed

+17626
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+17626
-0
lines changed

.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

.flowconfig

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
14+
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
17+
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
20+
21+
[include]
22+
23+
[libs]
24+
node_modules/react-native/Libraries/react-native/react-native-interface.js
25+
node_modules/react-native/flow/
26+
27+
[options]
28+
emoji=true
29+
30+
esproposal.optional_chaining=enable
31+
esproposal.nullish_coalescing=enable
32+
33+
module.file_ext=.js
34+
module.file_ext=.json
35+
module.file_ext=.ios.js
36+
37+
munge_underscores=true
38+
39+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
40+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
41+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
42+
43+
suppress_type=$FlowIssue
44+
suppress_type=$FlowFixMe
45+
suppress_type=$FlowFixMeProps
46+
suppress_type=$FlowFixMeState
47+
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51+
52+
[lints]
53+
sketchy-null-number=warn
54+
sketchy-null-mixed=warn
55+
sketchy-number=warn
56+
untyped-type-import=warn
57+
nonstrict-import=warn
58+
deprecated-type=warn
59+
unsafe-getters-setters=warn
60+
inexact-spread=warn
61+
unnecessary-invariant=warn
62+
signature-verification-failure=warn
63+
deprecated-utility=error
64+
65+
[strict]
66+
deprecated-type
67+
nonstrict-import
68+
sketchy-null
69+
unclear-type
70+
unsafe-getters-setters
71+
untyped-import
72+
untyped-type-import
73+
74+
[version]
75+
^0.105.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# node.js
33+
#
34+
node_modules/
35+
npm-debug.log
36+
yarn-error.log
37+
38+
# BUCK
39+
buck-out/
40+
\.buckd/
41+
*.keystore
42+
!debug.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.js

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow
7+
*/
8+
9+
import React from 'react';
10+
import {
11+
SafeAreaView,
12+
StyleSheet,
13+
ScrollView,
14+
View,
15+
Text,
16+
StatusBar,
17+
} from 'react-native';
18+
19+
import {
20+
Header,
21+
LearnMoreLinks,
22+
Colors,
23+
DebugInstructions,
24+
ReloadInstructions,
25+
} from 'react-native/Libraries/NewAppScreen';
26+
import Ionicons from 'react-native-vector-icons/Ionicons';
27+
import { createAppContainer } from 'react-navigation';
28+
import { createBottomTabNavigator } from 'react-navigation-tabs';
29+
30+
import CameraScreen from './screens/CameraScreen';
31+
import LocationScreen from './screens/LocationScreen';
32+
import BluetoothScreen from './screens/BluetoothScreen';
33+
34+
// const App: () => React$Node = () => {
35+
// return (
36+
// <>
37+
// <StatusBar barStyle="dark-content" />
38+
// <SafeAreaView>
39+
// <ScrollView
40+
// contentInsetAdjustmentBehavior="automatic"
41+
// style={styles.scrollView}>
42+
// <Header />
43+
44+
// <View style={styles.body}>
45+
// <View style={styles.sectionContainer}>
46+
// <Text style={styles.sectionTitle}>Step One</Text>
47+
// <Text style={styles.sectionDescription}>
48+
// Edit <Text style={styles.highlight}>App.js</Text> to change this
49+
// screen and then come back to see your edits.
50+
// </Text>
51+
// </View>
52+
53+
// </View>
54+
// </ScrollView>
55+
// </SafeAreaView>
56+
// </>
57+
// );
58+
// };
59+
60+
61+
62+
63+
64+
65+
66+
const TabNavigator = createBottomTabNavigator(
67+
{
68+
Camera: { screen: CameraScreen },
69+
Location: { screen: LocationScreen },
70+
Bluetooth: { screen: BluetoothScreen },
71+
},
72+
{
73+
defaultNavigationOptions: ({ navigation }) => ({
74+
tabBarIcon: ({ focused, tintColor }) => {
75+
const { routeName } = navigation.state;
76+
let iconName;
77+
if (routeName === 'Camera') {
78+
iconName = `ios-information-circle${focused ? '' : '-outline'}`;
79+
} else if (routeName === 'Location') {
80+
iconName = `ios-options${focused ? '' : '-outline'}`;
81+
} else if (routeName === 'Bluetooth') {
82+
iconName = `ios-options${focused ? '' : '-outline'}`;
83+
}
84+
85+
// You can return any component that you like here! We usually use an
86+
// icon component from react-native-vector-icons
87+
return <Ionicons name={iconName} size={25} color={tintColor} />;
88+
},
89+
}),
90+
tabBarOptions: {
91+
activeTintColor: 'tomato',
92+
inactiveTintColor: 'gray',
93+
},
94+
}
95+
);
96+
97+
98+
99+
100+
101+
const styles = StyleSheet.create({
102+
scrollView: {
103+
backgroundColor: Colors.lighter,
104+
},
105+
engine: {
106+
position: 'absolute',
107+
right: 0,
108+
},
109+
body: {
110+
backgroundColor: Colors.white,
111+
},
112+
sectionContainer: {
113+
marginTop: 32,
114+
paddingHorizontal: 24,
115+
},
116+
sectionTitle: {
117+
fontSize: 24,
118+
fontWeight: '600',
119+
color: Colors.black,
120+
},
121+
sectionDescription: {
122+
marginTop: 8,
123+
fontSize: 18,
124+
fontWeight: '400',
125+
color: Colors.dark,
126+
},
127+
highlight: {
128+
fontWeight: '700',
129+
},
130+
footer: {
131+
color: Colors.dark,
132+
fontSize: 12,
133+
fontWeight: '600',
134+
padding: 4,
135+
paddingRight: 12,
136+
textAlign: 'right',
137+
},
138+
});
139+
140+
// export default App;
141+
142+
export default createAppContainer(TabNavigator);

README.md

104 Bytes

reactNative-camera-maps-bluetooth-tabNavigation

__tests__/App-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

0 commit comments

Comments
 (0)