Skip to content

Commit a68daa1

Browse files
committed
Change transition and remove clean when destroy
1 parent 32f1367 commit a68daa1

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class ReactNativeActivity : ReactActivity(), DefaultHardwareBackBtnHandler, Perm
5252

5353
if (ReactNativeBrownfield.shared.reactNativeHost.hasInstance()) {
5454
ReactNativeBrownfield.shared.reactNativeHost.reactInstanceManager?.onHostDestroy(this)
55-
ReactNativeBrownfield.shared.reactNativeHost.clear()
5655
}
5756
}
5857

android/src/main/java/com/callstack/reactnativebrownfield/ReactNativeFragment.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class ReactNativeFragment : Fragment(), PermissionAwareActivity {
8080

8181
if (reactInstanceMgr.lifecycleState != LifecycleState.RESUMED) {
8282
reactInstanceMgr.onHostDestroy(activity)
83-
ReactNativeBrownfield.shared.reactNativeHost.clear()
8483
}
8584
}
8685
}

example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ class MainActivity : AppCompatActivity() {
2020
"ReactNative"
2121
)
2222
startActivity(intent)
23+
overridePendingTransition(R.anim.slide_fade_in, android.R.anim.fade_out);
2324
}
2425

2526
fun startReactNativeFragment(view: View) {
2627
val intent = Intent(this, ReactNativeFragmentActivity::class.java)
2728
startActivity(intent)
29+
overridePendingTransition(R.anim.slide_fade_in, android.R.anim.fade_out);
2830
}
2931
}

example/kotlin/app/src/main/java/com/callstack/kotlinexample/MainApplication.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class MainApplication : Application(), ReactApplication {
1717
options["packages"] = packages
1818
options["mainModuleName"] = "example/index"
1919

20-
ReactNativeBrownfield.initialize(options, this)
20+
ReactNativeBrownfield.initialize(this, options)
2121
ReactNativeBrownfield.shared.startReactNative { init -> Log.d("test", "test") }
2222
}
2323

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<set xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:duration="200"
4+
>
5+
<translate
6+
android:fromYDelta="10%p"
7+
android:toYDelta="0"/>
8+
<alpha
9+
android:fromAlpha="0.0"
10+
android:toAlpha="1"/>
11+
</set>

0 commit comments

Comments
 (0)