gpt4 book ai didi

ios - 如何在 IOS(React Native) 中创建像 android 一样的两个 Activity?

转载 作者:行者123 更新时间:2023-11-29 05:18:21 26 4
gpt4 key购买 nike

我想制作一个应用程序,该应用程序将在 IOS(React Native)中具有两个具有不同应用程序启动图标的 Activity。

我在 Android 中做了这个。代码如下。

      <activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".NotifierActivity"
android:label="SOS"
android:icon="@mipmap/ic_launcher_sos"
android:roundIcon="@mipmap/ic_launcher_sos_round"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

我是初学者。所以,我非常需要你的帮助。

最佳答案

An example for mainfest, Let me know if you are seeking for more help. You need to add this in app/AndroidManifest.xml

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true"
android:largeHeap="true"
android:usesCleartextTraffic="true"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".NotifierActivity"
android:label="SOS"
android:icon="@mipmap/ic_launcher_sos"
android:roundIcon="@mipmap/ic_launcher_sos_round"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

关于ios - 如何在 IOS(React Native) 中创建像 android 一样的两个 Activity?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58948714/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com