Skip to content

Commit

Permalink
chore(android): remove unused launch_splash.xml (#2411)
Browse files Browse the repository at this point in the history
  • Loading branch information
imhoffd committed Feb 6, 2020
1 parent dae3510 commit 8c9fe93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 35 deletions.
5 changes: 0 additions & 5 deletions android-template/app/src/main/res/drawable/launch_splash.xml

This file was deleted.

34 changes: 4 additions & 30 deletions site/docs-md/apis/splash-screen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,38 +132,12 @@ These config parameters are available in `capacitor.config.json`:

### Android

If your splash screen images aren't named "splash.png" but for example "screen.png" you have to change `"androidSplashResourceName": "screen"` in `capacitor.config.json` and change the following files in you're Android app as well:
To use splash screen images named something other than `splash.png`, set `androidSplashResourceName` to the new resource name in `capacitor.config.json`. Additionally, in `android/app/src/main/res/values/styles.xml`, change the resource name in the following block:

`android/app/src/main/res/drawable/launch_splash.xml`

replace
```xml
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/splash"
android:scaleType="centerCrop"
/>
```
with
```xml
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/screen"
android:scaleType="centerCrop"
/>
```

`android/app/src/main/res/values/styles.xml`

replace
```xml
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:background">@drawable/splash</item>
</style>
```
with
```xml
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:background">@drawable/screen</item>
</style>
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<item name="android:background">@drawable/NAME</item>
</style>
```

## Example Guides
Expand Down

0 comments on commit 8c9fe93

Please sign in to comment.