Skip to content

Commit 23885bf

Browse files
committed
Added Charts which supports to Android and iOS.
Charts added with custom changes.
0 parents  commit 23885bf

File tree

71 files changed

+5395
-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.

71 files changed

+5395
-0
lines changed

.gitignore

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

App.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow strict-local
7+
*/
8+
9+
import React from 'react';
10+
import type {Node} from 'react';
11+
import {
12+
SafeAreaView,
13+
ScrollView,
14+
StatusBar,
15+
StyleSheet,
16+
Text,
17+
useColorScheme,
18+
View,
19+
} from 'react-native';
20+
21+
import {
22+
Colors,
23+
DebugInstructions,
24+
Header,
25+
LearnMoreLinks,
26+
ReloadInstructions,
27+
} from 'react-native/Libraries/NewAppScreen';
28+
29+
const Section = ({children, title}): Node => {
30+
const isDarkMode = useColorScheme() === 'dark';
31+
return (
32+
<View style={styles.sectionContainer}>
33+
<Text
34+
style={[
35+
styles.sectionTitle,
36+
{
37+
color: isDarkMode ? Colors.white : Colors.black,
38+
},
39+
]}>
40+
{title}
41+
</Text>
42+
<Text
43+
style={[
44+
styles.sectionDescription,
45+
{
46+
color: isDarkMode ? Colors.light : Colors.dark,
47+
},
48+
]}>
49+
{children}
50+
</Text>
51+
</View>
52+
);
53+
};
54+
55+
const App: () => Node = () => {
56+
const isDarkMode = useColorScheme() === 'dark';
57+
58+
const backgroundStyle = {
59+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
60+
};
61+
62+
return (
63+
<SafeAreaView style={backgroundStyle}>
64+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
65+
<ScrollView
66+
contentInsetAdjustmentBehavior="automatic"
67+
style={backgroundStyle}>
68+
<Header />
69+
<View
70+
style={{
71+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
72+
}}>
73+
<Section title="Step One">
74+
Edit <Text style={styles.highlight}>App.js</Text> to change this
75+
screen and then come back to see your edits.
76+
</Section>
77+
<Section title="See Your Changes">
78+
<ReloadInstructions />
79+
</Section>
80+
<Section title="Debug">
81+
<DebugInstructions />
82+
</Section>
83+
<Section title="Learn More">
84+
Read the docs to discover what to do next:
85+
</Section>
86+
<LearnMoreLinks />
87+
</View>
88+
</ScrollView>
89+
</SafeAreaView>
90+
);
91+
};
92+
93+
const styles = StyleSheet.create({
94+
sectionContainer: {
95+
marginTop: 32,
96+
paddingHorizontal: 24,
97+
},
98+
sectionTitle: {
99+
fontSize: 24,
100+
fontWeight: '600',
101+
},
102+
sectionDescription: {
103+
marginTop: 8,
104+
fontSize: 18,
105+
fontWeight: '400',
106+
},
107+
highlight: {
108+
fontWeight: '700',
109+
},
110+
});
111+
112+
export default App;

__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+
});

android/app/BUCK

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
13+
lib_deps = []
14+
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
18+
19+
android_library(
20+
name = "all-libs",
21+
exported_deps = lib_deps,
22+
)
23+
24+
android_library(
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
34+
)
35+
36+
android_build_config(
37+
name = "build_config",
38+
package = "com.chartsampleapp",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.chartsampleapp",
44+
res = "src/main/res",
45+
)
46+
47+
android_binary(
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
55+
)

0 commit comments

Comments
 (0)