Skip to content

Commit 93cfc9e

Browse files
committed
chore: add kotlin version of code
1 parent c7d8d86 commit 93cfc9e

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

versioned_docs/version-6.x/getting-started.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ work on Android devices. Edit `MainActivity.java` file which is located in `andr
7474

7575
Add the highlighted code to the body of `MainActivity` class:
7676

77+
<details open>
78+
<summary>Java</summary>
79+
7780
```java {3-6}
7881
public class MainActivity extends ReactActivity {
7982
// ...
@@ -84,6 +87,21 @@ public class MainActivity extends ReactActivity {
8487
// ...
8588
}
8689
```
90+
</details>
91+
92+
<details>
93+
<summary>Kotlin</summary>
94+
95+
```kotlin {3-5}
96+
class MainActivity: ReactActivity() {
97+
// ...
98+
override fun onCreate(savedInstanceState: Bundle?) {
99+
super.onCreate(null);
100+
}
101+
// ...
102+
}
103+
```
104+
</details>
87105

88106
and make sure to add the following import statement at the top of this file below your package statement:
89107

versioned_docs/version-7.x/getting-started.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ work on Android devices. Edit `MainActivity.java` file which is located in `andr
7474

7575
Add the highlighted code to the body of `MainActivity` class:
7676

77+
<details open>
78+
<summary>Java</summary>
79+
7780
```java {3-6}
7881
public class MainActivity extends ReactActivity {
7982
// ...
@@ -84,6 +87,21 @@ public class MainActivity extends ReactActivity {
8487
// ...
8588
}
8689
```
90+
</details>
91+
92+
<details>
93+
<summary>Kotlin</summary>
94+
95+
```kotlin {3-5}
96+
class MainActivity: ReactActivity() {
97+
// ...
98+
override fun onCreate(savedInstanceState: Bundle?) {
99+
super.onCreate(null);
100+
}
101+
// ...
102+
}
103+
```
104+
</details>
87105

88106
and make sure to add the following import statement at the top of this file below your package statement:
89107

0 commit comments

Comments
 (0)