Ionic app splash screen taking more time, to reduce its time as much as possible how can we do it.
try Updating seconds value in config.xml file(default is 3000 you can reduce it if you don't want splash screen you can put the value as 0)
<preference name="SplashScreenDelay" value="1000" />
reference link.
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
Related
I made a responsive doughnut in chartjs. On mobile devices the size fills out the screen nicely and is as I'd like it but when I switch to desktop it also fills out the entire screen and is too big for my liking. Is there a way to set the relative size to for example, half screen when viewing on desktop and then reverting to full-screen if being viewed on mobile?
I tried the different settings on the chartjs site but can't find anything helpful.
I recently uploaded a build file to my S3 bucket. All files were uploaded, but on the actual site, only the background image shows.
All elements and code are picked up by the inspector, but are invisible.
I should also note that the elements are functional. The buttons still work as intended. Just invisible.
If it will help, my site's URL is www.sidemountcalc.com
Any ideas?
Found the answer here:
The opacity value was changed to 1% after building the Reacjs project
In short, issue with react and opacity. Opacity is set from 0.0 - 1.0. So 75% opacity needs to be 0.75.
I am playing video from URL on Exoplayer, it stretching the video on resizing/on using resize_mode as I have mentioned in layout file using this I am not able to maintain the aspect ratio of video.
I want to do scale type CENTER_CROP like we do in TextureSurface as mentioned in image2 but I am getting output as image1
I have tried following example
Exoplayer Demo Example
My Output (Img 1) and Expected Output (Img 2)
exoplayer layout code
<com.google.android.exoplayer2.ui.SimpleExoPlayerView
android:id="#+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:resize_mode="fill" />
With this line app:resize_mode="fill" it fit the video in screen but stretch vertically,
So how can I solve this .
Following two lines helped me to play video in full-screen mode.
Using app:resize_mode in layout file this somehow help but it stretches the video as mentioned in the question picture.
<com.google.android.exoplayer2.ui.PlayerView
android:layout_width="match_parent"
app:resize_mode="...."
android:layout_height="match_parent" />
Try changing AspectRatioFrameLayout to FILL,FIT,ZOOM... as per yout requirement, changing below line worked for me.
exoVideoPlayerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL);
Bellow line will ensure that aspect ratio is correctly maintained even for 4:3 videos.
exoPlayer.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FIT);
Also you can try changing VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING in exoplayer
To maintain center crop in exo player below code worked for me:
Java code:
playerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_ZOOM);
or you can use from xml:
<com.google.android.exoplayer2.ui.PlayerView
android:id="#+id/playerView"
android:layout_width="match_parent"
app:resize_mode="zoom"
android:layout_height="match_parent" />
Following are the Resize Mode options to play around with
app:resize_mode="fixed_width"
app:resize_mode="fixed_height"
app:resize_mode="fill"
app:resize_mode="fit"
app:resize_mode="zoom"
You can try each one to see its affect on your container.
My issue was solved using below lines:
playerView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL);
exoPlayer.setVideoScalingMode(C.VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING);
Kotlin :
AndroidView(
modifier = Modifier.fillMaxSize().fillMaxHeight().fillMaxWidth(),
factory = {
StyledPlayerView(context).apply {
this.resizeMode = AspectRatioFrameLayout.RESIZE_MODE_FILL
}
})
I can not get ChartJS to restrict itself to 200px. It takes the entire width of the browser. What am I missing.
I am using the following CDN
<div id="pnlChart" style="height:200px" >
<canvas id="myChart" width="400" height="200" class="chart" ></canvas>
</div>
my data that is being returned from the server appears to be well formed and drawing the chart correctly. It does not have the width/height in it. (I have pulled this from Chrome's dev tools.
{"type":"line","labels":[0,2,6,7,8,9,10,11,12,13,14,1,3,4,5,15,16,17,18,19,20,21,22,23],"datasets":[{"label":"Data","data":[2,1,8,36,119,179,214,165,87,173,220,0,0,0,0,0,0,0,0,0,0,0,0,0]}]}
You should be able to disable this container-width filling behaviour by telling Chart.js not to use responsive mode. Try passing this into the global configuration of the chart (the highest level of options):
options: {
responsive: false
}
See the Chart.js documentation for an example of how this fits into the full definition of a chart.
If that does not work for some reason then you could instead limit the width of the div element which contains the canvas on which your graph is drawn. Based on your example you could add this to your CSS:
div#pnlChart {width: 200px}
Even if you can get one of these methods to work, ideally you don't want to be specifying fixed widths for items these days because it makes it harder for pages to display well on the myriad of device screens which are in use now.
It's much better to develop a responsive layout for your site which will adjust to suit any screen width, from small smartphones to large desktop monitors. Search online for guides about "responsive design" for articles about this subject.
I have a UITabBarController inside a UIPopoverController, which I am displaying solely from one UIBarButtonItem. When shown I want the popover to take up the maximum vertical height allowed. It works fine if I tap to display it, then dismiss, and then rotate. However if I have the popover displayed in landscape, and then rotate to portrait, it no longer will fill the entire vertical distance. I have the tab bar controller's content size property set to 320 by 1000, and I have even tried resetting this every time the device rotates. Worse yet, when the user activates the search bar the popover shrinks up extremely small, and stays that way until the app is restarted.
http://cl.ly/3JdC to http://cl.ly/3JdC
Also http://cl.ly/3JVF
How can I stop this, and have the popover always fill up the max vertical size?
I was just having the same problem and found out that it only happens when I present the UIPopoverController using the method:
- (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated
but it works fine when I use:
- (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated
Unfortunately UIBarButtonItem does not have a frame Rect you can use with this last method so my fix was to use the UIToolbar's frame and modify frame.origin.x and frame.size.width accordingly to make the popover appear on the right place next to the UIBarButtonItem.
Hopefully Apple will fix this in next releases of iOS.
Regards