Background image loads too slowly and appears only then when screen is already rendered - react-native

When I include all the content inside (means image works as a View) that image loads to slow. When you navigate to that screen everything is there but image loads quite late and that screen looks like very unprofessional because of that. I have many screens where image used as a full screen background and all those screens have the same behavior. Is there any solution for this issue?

Related

Even if the content page background color is set to transparent, while using PushModelAsync to navigate the page, the background color is always black

My goal is to view the content of the bottom page from the top of the other content page. In order to accomplish this, I used PushModalAsync to navigate and set the BackgroundColor property of the navigation page to Transparent. I can view the content on the bottom page on Android. However on the iOS platform, a black color is always displayed and I am unable to read the content of the bottom page. Why is the background color always black even when it is set to be transparent in PushModalAsync?
Note: The iOS platform displays a white screen when I change the navigation to PushAsync.
Expected Behavior:
Background color should not be black and it should be transparent when navigating using PushModalAsync
Actual Behavior:
Background color is always black even when the content page background color is set as transparent when navigating using PushModalAsync
Android Screenshot
iOS Screenshot
The issue reproducing sample is provided below:
DemoSample
If you want to do EXACTLY like that, it is not possible (it will require so much work that you can't expect someone to provide you the solution here).
On iOS that control (ViewController) is drawn that way in that presentation mode. So as long as you use that control and that mode it will work that way irrelevant if you use Xamarin or something else. As ViewControllers are most basic controls it is not realistic to replace them with something else. But you can replace presentation mode. In Xamarin.Forms you can do that this way:
<ContentPage ...
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core"
ios:Page.ModalPresentationStyle="FormSheet">
...
</ContentPage>
This will result in somewhat different visual presentation but that is the only way to have one ViewController drawn over another without going into some deep customization that would require tons of code, especially on Xamarin.Forms.
You can also try some other values, but the default value will not work.
In iOS, the hierarchy is managed by the view controller. Each page has a separate view controller. A page consists of a window, a root view, and a subview. You cannot see the layout of the previous page by setting the background color to be transparent.
For more details, you can refer to the following documents:
User interface | Microsoft
The View Controller Hierarchy | Apple

View containers move around and change sizes

I have the same component in multiple screens, which I navigate to through React navigation. I'm using Tabnavigator.
On the first screen, the View containers move around if the text is too long. I have a fixed flex-size on my view containers, but it doesn't take that into consideration. The strange is, it's only on the first screen. A gif to show you what I mean.
https://gfycat.com/KaleidoscopicEasygoingApisdorsatalaboriosa
I have linked a Snack to show you my code:
https://snack.expo.io/#cronnay/show-inconsistency
I've checked if it's because of the scrollview I have, and I was inconsistent with my design on the scrollviews. but they all have the same styling.
What the heck is going on?
EDIT: Uploaded new gif that shows that I navigate to same component through two different ways. And it makes the design screw up.
https://gfycat.com/HappyPracticalAustralianfreshwatercrocodile

White Flash inbetween Re-rendering Image Views

Not sure if this is a huge issue, but I am not completely sure a solution exists to this.
When creating a slideshow style element, where upon tap you image changes to another image (already prefetched using React Native's image prefetcher) there is this white flash when the screen re-renders (I think?).
Has there been a concrete solution to this? I can't figure out how something like say a snapchat story manages to render a new image completely instant
Has anyone ever done this? is the strategy to just load one image on top of another?

application showing gray screen for a while after splash screen in winrt

I am working on winRT XAML application, in my main page i have some large images. When i launch the aplication it shows blank screen for a while in between splash screen and main screen. Any solution for this? i think same issue as in Phonegap showing white screen after the splash screen - IOS but its in winRT in my case.
This sounds like something I experienced in the past when I set the page background to an image. It can take a little while for the image to get loaded and displayed on the page, and therefore you end up with a fraction of a second of unstyled page. Is that what's going on here? If so, try reducing the size / quality of your image to see if it makes a difference. If it does, your work is just starting as you try to find an acceptable compromise between image quality and file size.
Look up "extended splash screen". The technique is basically that you make your app display a splash screen image on a solid color background that looks the same as the one displayed by the Windows shell when it starts your app. The splash screen image is small enough that when your app starts showing just the splash screen - it shows seamlessly and then you can load your first page in the background.

make overscroll area under Web View transparent?

I have a WebView that is working perfectly. When I scroll it (up or down) past it's content I see a white area "Behind" the web page. (had an image here, but couldn't post due to being new).
I would like to set the overscroll color to clear.
To be precise I have played with setting the WebView background to transparent, and that does not achieve the desired result. That makes the entire page clear to the background of my app. I only want to see the app background if the user has scrolled past the contents of the window.
Any ideas?
Try this:
yourwebviewname.opaque=NO;