Skip to content

Conversation

@Okuro3499
Copy link
Contributor

@Okuro3499 Okuro3499 commented Jul 23, 2024

fixes #1862

splash.mp4

@Okuro3499 Okuro3499 force-pushed the 1862-use-the-splashscreen-api branch from d2387a4 to cea4d77 Compare September 20, 2024 13:55
@Okuro3499 Okuro3499 marked this pull request as ready for review September 20, 2024 14:00
@Okuro3499 Okuro3499 requested review from dogi and xyb994 September 20, 2024 14:01
@xyb994
Copy link
Member

xyb994 commented Sep 25, 2024

Getting this on my Android 11 phone

FATAL EXCEPTION: main
Process: io.treehouses.remote, PID: 5384
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.treehouses.remote/io.treehouses.remote.SplashScreenActivity}: android.content.res.Resources$NotFoundException: Drawable io.treehouses.remote:drawable/compat_splash_screen_no_icon_background with resource ID #0x7f08009c
  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3616)
  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3780)
  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2251)
  at android.os.Handler.dispatchMessage(Handler.java:106)
  at android.os.Looper.loop(Looper.java:233)
  at android.app.ActivityThread.main(ActivityThread.java:8068)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)
Caused by: android.content.res.Resources$NotFoundException: Drawable io.treehouses.remote:drawable/compat_splash_screen_no_icon_background with resource ID #0x7f08009c
Caused by: android.content.res.Resources$NotFoundException: Drawable io.treehouses.remote:drawable/splash_screen_image with resource ID #0x7f080184
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/splash_screen_image.xml from drawable resource ID #0x7f080184
  at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:937)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:712)
  at android.content.res.Resources.loadDrawable(Resources.java:993)
  at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:1034)
  at android.content.res.TypedArray.getDrawable(TypedArray.java:1009)
  at android.graphics.drawable.LayerDrawable.updateLayerFromTypedArray(LayerDrawable.java:387)
  at android.graphics.drawable.LayerDrawable.applyTheme(LayerDrawable.java:229)
  at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:727)
  at android.content.res.Resources.loadDrawable(Resources.java:993)
  at android.content.res.Resources.getDrawableForDensity(Resources.java:983)
  at android.content.res.Resources.getDrawable(Resources.java:922)
  at android.content.Context.getDrawable(Context.java:693)
  at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:1049)
  at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:485)
  at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:147)
  at androidx.appcompat.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:475)
  at androidx.appcompat.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:93)
  at androidx.appcompat.app.AppCompatDelegateImpl.attachToWindow(AppCompatDelegateImpl.java:848)
  at androidx.appcompat.app.AppCompatDelegateImpl.ensureWindow(AppCompatDelegateImpl.java:824)
  at androidx.appcompat.app.AppCompatDelegateImpl.onCreate(AppCompatDelegateImpl.java:531)
  at androidx.appcompat.app.AppCompatActivity$2.onContextAvailable(AppCompatActivity.java:133)
  at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.kt:84)
  at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:358)
  at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
  at io.treehouses.remote.SplashScreenActivity.onCreate(SplashScreenActivity.kt:26)
  at android.app.Activity.performCreate(Activity.java:8006)
  at android.app.Activity.performCreate(Activity.java:7990)
  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)

@Okuro3499 Okuro3499 added the WIP label Oct 2, 2024
@Okuro3499
Copy link
Contributor Author

@xyb994 retest this

@Okuro3499 Okuro3499 removed the WIP label Oct 7, 2024
@dogi dogi changed the title splashscreen: use android api (fixes #1862) welcome: smoother start (fixes #1862) Oct 14, 2024
@dogi dogi merged commit bb47a51 into master Oct 14, 2024
1 check passed
@Okuro3499 Okuro3499 deleted the 1862-use-the-splashscreen-api branch November 11, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use the SplashScreen API

4 participants