xref: /MusicFree/android/app/src/main/java/fun/upup/musicfree/MainActivity.kt (revision b72437776165146f05624469023a64a2365044b4)
15589cdf3S猫头猫 package `fun`.upup.musicfree
25589cdf3S猫头猫 import expo.modules.ReactActivityDelegateWrapper
35589cdf3S猫头猫 
45589cdf3S猫头猫 import com.facebook.react.ReactActivity
55589cdf3S猫头猫 import com.facebook.react.ReactActivityDelegate
65589cdf3S猫头猫 import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
75589cdf3S猫头猫 import com.facebook.react.defaults.DefaultReactActivityDelegate
8*b7243777Smaotoumao import android.os.Bundle
95589cdf3S猫头猫 
105589cdf3S猫头猫 class MainActivity : ReactActivity() {
115589cdf3S猫头猫 
125589cdf3S猫头猫   /**
135589cdf3S猫头猫    * Returns the name of the main component registered from JavaScript. This is used to schedule
145589cdf3S猫头猫    * rendering of the component.
155589cdf3S猫头猫    */
getMainComponentNamenull165589cdf3S猫头猫   override fun getMainComponentName(): String = "MusicFree"
175589cdf3S猫头猫 
185589cdf3S猫头猫   /**
195589cdf3S猫头猫    * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
205589cdf3S猫头猫    * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
215589cdf3S猫头猫    */
225589cdf3S猫头猫   override fun createReactActivityDelegate(): ReactActivityDelegate =
235589cdf3S猫头猫       ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))
24*b7243777Smaotoumao 
25*b7243777Smaotoumao   // https://reactnavigation.org/docs/getting-started/#installing-dependencies-into-a-bare-react-native-project
26*b7243777Smaotoumao   override fun onCreate(savedInstanceState: Bundle?) {
27*b7243777Smaotoumao       super.onCreate(null);
28*b7243777Smaotoumao   }
295589cdf3S猫头猫 }
30