baraaksayeth commented on issue #1654:
URL: 
https://github.com/apache/cordova-android/issues/1654#issuecomment-1698459592

   Thanks for the information.
   
   after searching I found how to add a branding image on android 11 and below.
   
   Maybe this is useful for others.
   
   I added _launch_background.xml_ in 
**/platforms/android/app/src/main/res/drawable**
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <layer-list xmlns:android="http://schemas.android.com/apk/res/android";>
       <item android:drawable="@color/launcherBackground" />
       <item android:gravity="center" 
android:drawable="@drawable/ic_cdv_splashscreen" />
       <item android:width="200dp" android:height="80dp" 
android:drawable="@drawable/ic_cdv_splashscreen_branding" 
android:gravity="center|bottom" />
   </layer-list>
   ```
   
   **make sure you have a colors.xml file that located in 
/platforms/android/app/src/main/res/values**
   ```
   <?xml version='1.0' encoding='utf-8'?>
   <resources xmlns:tools="http://schemas.android.com/tools";>
       <color name="cdv_splashscreen_background">#2F3992</color>
       <color name="launcherBackground">#2F3992</color>
   </resources>
   ```
   
   after that I changed the _themes.xml_ which is located in 
**/platforms/android/app/src/main/res/values**
   ```
   <?xml version='1.0' encoding='utf-8'?>
   <resources xmlns:tools="http://schemas.android.com/tools";>
       <style name="LaunchTheme" parent="Theme.SplashScreen">
           <item 
name="android:windowSplashScreenBrandingImage">@drawable/ic_cdv_splashscreen_branding</item>
           <item 
name="windowSplashScreenBackground">@color/cdv_splashscreen_background</item>
           <item 
name="postSplashScreenTheme">@style/Theme.AppCompat.NoActionBar</item>
           <item name="windowSplashScreenAnimationDuration">200</item>
           <item 
name="android:windowBackground">@drawable/launch_background</item>
           <item 
name="windowSplashScreenAnimatedIcon">@drawable/ic_cdv_splashscreen</item>
       </style>
   </resources>
   ```
   
   and finally I changed android:theme from _AndroidManifest.xml_ which is in 
**/platforms/android/app/src/main**
   ```
   <activity ... android:theme="@style/LaunchTheme">
   ```
   
   I hope this will be useful for others 😄 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to