Comments (15)
Windows platform (and maybe browser) already have a SplashScreenBackgroundColor
preference.
On iOS would be as simple as adding a color to the image view where the splash is loaded, but it only applies to the legacy splash images, didn't check on the storyboard use case. Not sure about Android neither.
from cordova-ios.
Just do understand the issue better: Why isn't adding a background color to the splashscreen an option?
from cordova-ios.
Thanks for the reply @janpio
Generally a background in the actual image could be added. But in our case we are using the same image in some places of the app (To save disk storage). And the background is only need for the splash screen.
from cordova-ios.
Thanks for the clarification, although very special case it makes sense.
from cordova-ios.
About one year ago, I added support on Android for SplashScreenBackgroundColor
and SplashScreenTheme
in a private fork but never submitted a pull request. I'm not sure but I think the Android version of the plugin has been modified since then.
from cordova-ios.
If you still have the fork, please still open the pull request - we can fix those conflicts if there are any. The important thing are your changes @IndieSW 👍
from cordova-ios.
I'd be happy to but I don't have time right now to resolve conflicts and test. I've used my fork in an app and tested though so I know the changes work.
Should that be a fork of the master branch?
from cordova-ios.
Yeah, or whatever you already have. If you submit it and link to this issue, we can have a look and create a new fork based on your changes. Probably not that drastic.
from cordova-ios.
See PR: apache/cordova-plugin-splashscreen#161
Github diff wasn't very kind. To summarize the changes:
- a SplashScreenThemeId preference is initialized in pluginInitialize() and defaults to the previously hardcoded value. this follows the way drawableId is handled.
- isActivityFullScreen() was added with logic removed from showSplashScreen().
- in showSplashScreen() - before the Runnable:
- int themeId is set to the SplashScreenThemeId preference value.
- int backgroundColor is set according to the SplashScreenBackgroundColor preference and defaults to the previously coded value.
- in showSplashScreen() - in the Runnable:
- the background color of the ImageView is set to int backgroundColor.
- the Dialog is created with int themeId.
- isActivityFullScreen() is used to decide whether to add FLAG_FULLSCREEN to the Dialog Window LayoutParams.
Hope that helps. Please let me know if you have any questions. Also, the changes were made to version 4.0.4-dev according to the plugin.xml. I'm not sure which commit that corresponds to.
from cordova-ios.
I took your file and applied it to the 4.0.x release branch. Makes a much nicer diff: https://github.com/apache/cordova-plugin-splashscreen/pull/162/files
from cordova-ios.
@janpio Perfect!
from cordova-ios.
Any progress here?
from cordova-ios.
Hey there, any updates? It's a topic for Dark Mode too.
from cordova-ios.
Removing the android platform tag because cordova-android@11 splashscreen uses the Android 12 Splashscreen API, and exposes an option to set the background color.
I'm not sure if adding a background option is possible for iOS. I'm fairly certain you have to supply an image, but I'll leave this open for someone who is more knowledgeable in iOS development.
from cordova-ios.
As this repo also does not support iOS anymore, I will be moving this ticket to the cordova-ios repo
from cordova-ios.
Related Issues (20)
- Gamepad API does not work (WKWebView needs to be firstResponder?) HOT 9
- Error in cordova prepare when update cordova-ios from 6 to 7. HOT 1
- Please remove org_apache_cordova_UIView_Extension because it isn't necessary since iOS 8.
- SplashScreen not loading on [email protected] HOT 8
- Cannot run new iOS app since latest upgrade HOT 18
- Trouble to open Instagram App HOT 2
- Any alternative to CDVCommandDelegateImpl which is removed from public classes? HOT 6
- [Next Major] Delete bin/cordova_plist_to_config_xml script
- Several template project bin scripts are broken
- Add preferences to config.xml to control which are the "Supported Destinations"
- Issue with `<privacy-manifest>` and `cordora prepare ios` HOT 3
- The CDVURLProtocol no longer exists, so how should we modify the interception? HOT 3
- The startURLSchemeTask method in CDVURLSchemeHandler was not executed HOT 2
- Copy deployment-target from root config.xml to platform-specific config.xml before usage in Podfile HOT 5
- WKWebViewConfiguration is always ignored
- Missing API declaration on iOS app submission to App Store HOT 5
- CDVPlugin's viewController should just be a CDVViewController
- CDVWebViewUIDelegate should take a CDVViewController
- Cordova ios 7.1.0 - Build failed with "Command failed with exit code 65" HOT 4
- Several version checks fail after cordova-ios platform add [email protected] HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-ios.