I have this in my config.xml
<preference name="show-splash-screen-spinner" value="true" />
And the spinner works great, however i need to change the position from center
to something like center + 10%
vertically
There is any way of doing this?
You have to fork the original cordova-plugin-splashscreen on github
Then on your config.xml you change it to use your fork, remove the original plugin (something like <plugin name="cordova-plugin-splashscreen" source="npm" />
) and add your fork <plugin spec="https://github.com/youruser/cordova-plugin-splashscreen.git" />
You have to change this lines to do what you want https://github.com/apache/cordova-plugin-splashscreen/blob/master/src/android/SplashScreen.java#L355-L370
Right now it centers the dialog, I'm not really sure how to accomplish what you want, you'll have to figure out how Android layouts work
You can try to use setY as progressBar is a View subclass, something like this:
DisplayMetrics displaymetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int height = displaymetrics.heightPixels;
float position = (float) (height*0.4);
progressBar.setY(position);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With