スプラッシュ画面の変更

This commit is contained in:
tateisu 2024-01-29 20:45:45 +09:00
parent f8aaedf86a
commit ab094216d3
19 changed files with 60 additions and 8 deletions

View File

@ -166,6 +166,8 @@ dependencies {
"fcmImplementation"("com.google.firebase:firebase-messaging:23.4.0")
"fcmImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:${Vers.kotlinxCoroutinesVersion}")
implementation("androidx.core:core-splashscreen:1.0.1")
// implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
api("org.conscrypt:conscrypt-android:${Vers.conscryptVersion}")
implementation("com.github.UnifiedPush:android-connector:2.1.1")

View File

@ -101,7 +101,7 @@
android:maxAspectRatio="100"
android:resizeableActivity="true"
android:supportsRtl="true"
android:theme="@style/AppTheme.Light"
android:theme="@style/Theme.App.Starting"
tools:ignore="DataExtractionRules,UnusedAttribute">
<activity

View File

@ -5,6 +5,7 @@ import android.net.Uri
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.FileProvider
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import jp.juggler.subwaytooter.pref.FILE_PROVIDER_AUTHORITY
import jp.juggler.util.*
import jp.juggler.util.data.digestSHA256Hex
@ -47,6 +48,9 @@ class ActCallback : AppCompatActivity() {
}
override fun onCreate(savedInstanceState: Bundle?) {
installSplashScreen()
App1.setActivityTheme(this)
var intent = this.intent
log.d("onCreate flags=0x${intent?.flags?.toString(radix = 16)}")
super.onCreate(savedInstanceState)

View File

@ -17,6 +17,7 @@ import android.widget.ImageButton
import android.widget.LinearLayout
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.drawerlayout.widget.DrawerLayout
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.RecyclerView
@ -398,6 +399,7 @@ class ActMain : AppCompatActivity(),
override fun onCreate(savedInstanceState: Bundle?) {
log.d("onCreate")
installSplashScreen()
refActMain = WeakReference(this)
supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
super.onCreate(savedInstanceState)

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,21 +3,31 @@
<!-- light theme -->
<style name="AppTheme.Light" parent="AppTheme.Light.Base">
<item name="android:windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="android:windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="android:windowSplashScreenAnimationDuration">1000</item>
<item name="windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
</style>
<!-- dark theme -->
<style name="AppTheme.Dark" parent="AppTheme.Dark.Base">
<item name="android:windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="android:windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="android:windowSplashScreenAnimationDuration">1000</item>
<item name="windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
</style>
<!-- Mastidon theme -->
<style name="AppTheme.Mastodon" parent="AppTheme.Mastodon.Base">
<item name="android:windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="android:windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
<item name="android:windowSplashScreenAnimationDuration">1000</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="android:windowSplashScreenAnimationDuration">100</item>
<item name="windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="windowSplashScreenAnimationDuration">100</item>
</style>
</resources>

View File

@ -148,7 +148,7 @@
<!-- =================================================== -->
<!-- スプラッシュ画面の背景色はテーマ関係なし -->
<color name="Other_splashBackground">#0080ff</color>
<color name="Other_splashBackground">#000000</color>
<!-- 通知のアクセント色 -->
<color name="colorOsNotificationAccent">#B3E1FF</color>

View File

@ -203,10 +203,8 @@
<item name="android:textColor">@color/Dark_colorTextTimeSmall</item>
</style>
<style name="AppTheme.Mastodon.Base" parent="Theme.AppCompat.NoActionBar">
<!-- AppCompat ============================================ -->
<!-- テキスト色 -->

View File

@ -11,4 +11,14 @@
<style name="AppTheme.Mastodon" parent="AppTheme.Mastodon.Base">
</style>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/Other_splashBackground</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon_blue_white</item>
<item name="windowSplashScreenAnimationDuration">100</item>
<!-- Set the theme of the Activity that directly follows your splash screen. -->
<!-- Required -->
<item name="postSplashScreenTheme">@style/AppTheme.Mastodon</item>
</style>
</resources>