コメント
コメントの投稿
※名前とタイトルが入力されていないコメントでは他のコメントとの区別ができません。
入力されていないコメントには返信しませんのであらかじめご了承くださいませ。
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="MyTheme.Splash" parent ="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash_screen</item>
<!--Android12以降のスプラッシュスクリーンを無効にする-->
<item name="android:windowIsTranslucent">true</item>
<!--色々試した結果、以下は効果のない設定と思う
<item name="windowSplashScreenAnimationDuration">0</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<item name="windowSplashScreenBackground">@color/transparent</item>
<item name="windowSplashScreenAnimatedIcon">@color/transparent</item>
<item name="android:backgroundDimEnabled">false</item>
-->
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowActionBar">true</item>
</style>
</resources>
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true,
Name = "com.CompanyName.AppName.SplashActivity",
Exported = true,
NoHistory = true)]
public class SplashActivity : AppCompatActivity
{
public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
{
AndroidX.Core.SplashScreen.SplashScreen screen = AndroidX.Core.SplashScreen.SplashScreen.InstallSplashScreen(this);
base.OnCreate(savedInstanceState, persistentState);
}
}
※名前とタイトルが入力されていないコメントでは他のコメントとの区別ができません。
入力されていないコメントには返信しませんのであらかじめご了承くださいませ。