私はスプラッシュ画面に別々の活動を作成したが、テーマを追加していない:スプラッシュのアクティビティが作成されていない場合、スプラッシュ画面の時間を増やすにはどうすればよいですか?
<style name="SplashTheme" parent="AppTheme">
<item name="android:windowBackground">@drawable/splash</item>
</style>
だけマニフェストファイルを更新
<activity android:name=".MainActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
を私のスプラッシュXMLは次のとおりです。
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:src="@drawable/splash"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</FrameLayout>
私が見つけましたすべての答えは、別々のスプラッシュアクティビティで時間を増やすだけです。
一定の時間が経過した後に移行する個別のアクティビティが必要です。それ以外の場合はどうすればできるのでしょうか? – Shark
あなたの 'MainActivity'はメインアクティビティとスプラッシュスクリーンの両方であるので、代わりにメインアクティビティにコードを入れて一定時間"スプラッシュ状態 "にしてから、やるべきことをします。 – Shark