Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a splash screen when Amaze loads #3442

Closed
wants to merge 2 commits into from
Closed

Add a splash screen when Amaze loads #3442

wants to merge 2 commits into from

Conversation

dhruvpatidar359
Copy link

@dhruvpatidar359 dhruvpatidar359 commented Aug 20, 2022

Signed-off-by: dhruv [email protected]
closes #3139

Description

Issue tracker
Fixes #3139

Automatic tests

  • Added test cases

Manual tests

  • Done

Build tasks success

Successfully running following tasks on local:

  • ./gradlew assembledebug
  • ./gradlew spotlessCheck

@dhruvpatidar359
Copy link
Author

hello @EmmanuelMess can you please review this PR .

@dhruvpatidar359
Copy link
Author

@EmmanuelMess may you please help me how i can i resolve these checks , as am not getting a proper solution for it .

Copy link
Member

@EmmanuelMess EmmanuelMess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image used should not be a png, it should be an svg.

@@ -120,6 +120,7 @@ dependencies {
implementation "com.google.android.material:material:$androidMaterialVersion"
implementation "androidx.fragment:fragment-ktx:$androidXFragmentVersion"
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
implementation 'androidx.core:core-splashscreen:1.0.0-beta01'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might not want to use the splash screen library if it has API level issues.

@EmmanuelMess
Copy link
Member

You should run spotlessApply to fix check spotless.

@EmmanuelMess
Copy link
Member

EmmanuelMess commented Aug 21, 2022

A failing test:


com.amaze.filemanager.asynchronous.asynctasks.SshDeleteTaskTest > testDeleteSshFileAccessDenied[16] FAILED
    java.lang.NoSuchMethodError: 'android.graphics.drawable.Drawable android.content.res.Resources$Theme.getDrawable(int)'
        at androidx.core.splashscreen.SplashScreen$Impl.install(SplashScreen.kt:264)
        at androidx.core.splashscreen.SplashScreen.install(SplashScreen.kt:189)
        at androidx.core.splashscreen.SplashScreen.access$install(SplashScreen.kt:121)
        at androidx.core.splashscreen.SplashScreen$Companion.installSplashScreen(SplashScreen.kt:146)
        at androidx.core.splashscreen.SplashScreen.installSplashScreen(SplashScreen.kt)
        at com.amaze.filemanager.ui.activities.MainActivity.onCreate(MainActivity.java:331)
        at android.app.Activity.performCreate(Activity.java:5008)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
        at org.robolectric.android.internal.RoboMonitoringInstrumentation.callActivityOnCreate(RoboMonitoringInstrumentation.java:284)
        at org.robolectric.android.controller.ActivityController.lambda$create$0(ActivityController.java:113)
        at org.robolectric.shadows.ShadowPausedLooper.runPaused(ShadowPausedLooper.java:203)
        at org.robolectric.android.controller.ActivityController.create(ActivityController.java:113)
        at org.robolectric.android.controller.ActivityController.create(ActivityController.java:118)
        at org.robolectric.android.internal.RoboMonitoringInstrumentation.startActivitySyncInternal(RoboMonitoringInstrumentation.java:103)
        at org.robolectric.android.internal.LocalActivityInvoker.startActivity(LocalActivityInvoker.java:33)
        at org.robolectric.android.internal.LocalActivityInvoker.startActivity(LocalActivityInvoker.java:38)
        at androidx.test.core.app.ActivityScenario.launchInternal(ActivityScenario.java:265)
        at androidx.test.core.app.ActivityScenario.launch(ActivityScenario.java:195)
        at com.amaze.filemanager.asynchronous.asynctasks.AbstractDeleteTaskTestBase.doTestDeleteFileAccessDenied(AbstractDeleteTaskTestBase.kt:107)
        at com.amaze.filemanager.asynchronous.asynctasks.SshDeleteTaskTest.testDeleteSshFileAccessDenied(SshDeleteTaskTest.kt:53)

Are you using getDrawable on the wrong API level?

@dhruvpatidar359
Copy link
Author

dhruvpatidar359 commented Aug 22, 2022

@EmmanuelMess ok I will remove the library.
May you please explain the meaning of making the splash screen by hand as you said earlier
As i am not able to find any api that supports this.

@EmmanuelMess
Copy link
Member

May you please explain the meaning of making the splash screen by hand as you said earlier

I think you can use an activity to show an image, and start the main activity from there, so that the main activity loads with the initial image as background.

@dhruvpatidar359
Copy link
Author

dhruvpatidar359 commented Aug 23, 2022

@EmmanuelMess , i am not able to create a new activity as the minsdk is 14 but requires 16(minimum) for that i have to change the minsdk 14 to 16
image

@EmmanuelMess
Copy link
Member

@EmmanuelMess , i am not able to create a new activity as the minsdk is 14 but requires 16(minimum) for that i have to change the minsdk 14 to 16 image

That's with the dialog, you should create it by hand, or convert what the dialog creates to an API 14 compatible version.

@dhruvpatidar359 dhruvpatidar359 closed this by deleting the head repository Aug 26, 2022
@dhruvpatidar359
Copy link
Author

@EmmanuelMess is there any svg available for the icon in the project as i am not able to find it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a splash screen when Amaze loads
2 participants