Hello,
===========Update==========
but I am unable to set a white background. How can I set a white background?
Please open the styles.xml
in the Platforms/Android/Resouces/values
and add this <item name="android:windowSplashScreenBackground">@android:color/white</item>
line in the <style name="CustomSplashTheme" parent="Maui.SplashTheme">
Firstly, before you install the new generated APK, please uninstall it manually.
Then, We can try to set splash logo by native android's way. Please create a folder called Drawable
in the /Platform/Android/Resouces
path, then copy the logo.png
to the /Platform/Android/Resouces/Drawable
folder, make sure logo.png
s build cation is AndroidResource
.
After that, open the styles.xml
in the Platforms/Android/Resouces/values
, set the logo by <item name="android:windowSplashScreenAnimatedIcon">@drawable/splashlog</item>
like following code.
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="CustomSplashTheme" parent="Maui.SplashTheme">
<!--To turn off the highlight color-->
<item name="android:colorControlHighlight">@android:color/transparent</item>
<!--To turn off the application title bar-->
<item name="windowNoTitle">true</item>
<!--To enable working with SplashScreen-->
<item name="android:windowBackground">@drawable/maui_splash</item>
<!-- Copy your splash icon to the /Platform/Android/Resouces/Drawable folder, and set the buildaction to AndroidResource-->
<item name="android:windowSplashScreenAnimatedIcon">@drawable/logo</item>
</style>
</resources>
In the end, please set your build action to the Release, release your application, re-publish your application and generated your APK. By the way, you can refer to this Publish an Android app for ad-hoc distribution document.
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.