Android studio SplashScreen和注册活动出现问题

Android studio SplashScreen和注册活动出现问题,android-studio,Android Studio,我正在创建一个带有splashscreen的应用程序。在splashscreen之后,打开活动是进行用户注册过程的注册活动。在注册活动之后,它被定向到主活动 这是Android清单代码 <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.examapp"> <application <a

我正在创建一个带有splashscreen的应用程序。在splashscreen之后,打开活动是进行用户注册过程的注册活动。在注册活动之后,它被定向到主活动

这是Android清单代码

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

<application
    
    <activity android:name=".MainActivity"></activity>
    
    <activity
        android:name=".SplashScreen"
        android:theme="@style/SplashScreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".RegisterActivity"
        android:theme="@style/AppTheme"/>

    <meta-data
        android:name="preloaded_fonts"
        android:resource="@array/preloaded_fonts" />
</application>

RegisterActivity-->MainActivity

其余时间打开应用程序:Splashscreen-->MainActivity

面临的问题:

如果我在清单代码中将SplashScreen设置为LAUNCHER活动,则register活动会反复显示,如上所述

如果我在清单代码中将MainActivity设置为启动器,则SplashScreen将丢失

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

<application
    
    <activity android:name=".MainActivity"></activity>
    
    <activity
        android:name=".SplashScreen"
        android:theme="@style/SplashScreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".RegisterActivity"
        android:theme="@style/AppTheme"/>

    <meta-data
        android:name="preloaded_fonts"
        android:resource="@array/preloaded_fonts" />
</application>