Skip to content

Improve Documentation for RNN Installation #8042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 11, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
import com.reactnativenavigation.react.ReactGateway;
Expand Down Expand Up @@ -40,6 +41,9 @@ public void onCreate() {
} catch (IOException e) {
throw new RuntimeException(e);
}

DefaultNewArchitectureEntryPoint.load();

reactGateway = createReactGateway();
}

Expand Down
5 changes: 5 additions & 0 deletions playground/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply plugin: 'org.jetbrains.kotlin.android'

react {
root = file("../../../")
Expand Down Expand Up @@ -48,6 +49,9 @@ android {
signingConfig signingConfigs.release
}
}
kotlinOptions {
jvmTarget = '17'
}
}

dependencies {
Expand All @@ -59,6 +63,7 @@ dependencies {
implementation project(':react-native-fast-image')

implementation project(':react-native-navigation')
implementation 'androidx.core:core-ktx:1.16.0'

androidTestImplementation('com.wix:detox:+') { transitive = true }
androidTestImplementation 'junit:junit:4.12'
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.reactnativenavigation.playground

import android.os.Bundle
import android.widget.ImageView
import com.reactnativenavigation.NavigationActivity

class MainActivity : NavigationActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setSplashLayout()
}

private fun setSplashLayout() {
val img = ImageView(this)
img.setImageDrawable(getDrawable(R.drawable.ic_android))
setContentView(img)
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.reactnativenavigation.playground

import com.facebook.react.PackageList
import com.facebook.react.ReactHost
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost
import com.reactnativenavigation.NavigationApplication
import com.reactnativenavigation.RNNToggles
import com.reactnativenavigation.react.NavigationPackage
import com.reactnativenavigation.react.NavigationReactNativeHost

class MainApplication : NavigationApplication(mapOf(
RNNToggles.TOP_BAR_COLOR_ANIMATION__PUSH to true,
RNNToggles.TOP_BAR_COLOR_ANIMATION__TABS to true
)) {
override val reactNativeHost: ReactNativeHost = object : NavigationReactNativeHost(this) {
override fun getJSMainModuleName(): String {
return "index"
}

override fun getUseDeveloperSupport(): Boolean {
return BuildConfig.DEBUG
}

public override fun getPackages(): List<ReactPackage> {
val packages = PackageList(this).packages
packages.add(NavigationPackage())
return packages
}

override val isHermesEnabled: Boolean
get() = BuildConfig.IS_HERMES_ENABLED

override val isNewArchEnabled: Boolean
get() = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
}

override fun onCreate() {
super.onCreate()
registerExternalComponent("RNNCustomComponent", FragmentCreator())
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this, reactNativeHost)
}
1 change: 1 addition & 0 deletions playground/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ allprojects {
flatDir {
dirs "$rootProject.projectDir/libs"
}
mavenCentral()
}
}

Expand Down
Loading
Loading