Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Screens(Pages) with background image flicker on iOS #6

Open
sudhanshu-15 opened this issue Mar 8, 2017 · 10 comments
Open

Screens(Pages) with background image flicker on iOS #6

sudhanshu-15 opened this issue Mar 8, 2017 · 10 comments

Comments

@sudhanshu-15
Copy link

Screens which have a background image set, flicker when using orientation.disableRotation()
The background turns white for a moment and then gets the background image, and this keeps repeating every time you rotate the device.

@NathanaelA
Copy link
Owner

Thanks for the report. Do you have a sample XML and/or CSS so I know exactly how you are putting the background image on the screen.?

@sudhanshu-15
Copy link
Author

Thank you for the reply, here is the XML:

<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" loaded="loaded">
  <page.actionBar>
    <actionBar title="iStart">
    </actionBar>
  </page.actionBar>
  <ScrollView  class="test" id="sViewe">
    <StackLayout orietation= "veritcal">
      <android><Image src="res://iumoto" stretch="none" horizontalAlignment="center" class="logo"/></android>
      <ios><Image src="res://IUmoto" stretch="none" horizontalAlignment="center" class="logo"/></ios>
      <StackLayout orietation="vertical" class="stack" id="buStack">
        <Button text="Login" horizontalAlignment="center" tap="goToWebAuthPage"/>
        <Button text="Help" horizontalAlignment="center" tap="changeBg"/>
      </StackLayout>
    </StackLayout>
  </ScrollView>
</Page>

Here is the CSS:

.test {
    background-image: url("res://test");
    background-size: cover;
}

.stack {
    margin-left: 95;
    margin-right: 95;
    margin-top: 100;
    padding-bottom: 10;
    background-color: white;
    opacity: 0;
    border-radius: 20;
    min-width: 150;
    min-height: 105;
}

Button {
    margin: 10;
    padding: 2;
    font-size: 18;
    background-color: #7D110C;
    color: white;
    border-radius: 10;
    min-width: 50;
}

Button:highlighted { 
    background-color: #ac1710;
    color: white;
}


.action-image {
    width: 25;
    height: 25;
}

.action-label {
    font-size: 18;
    font-weight: bold;
}

.logo {
    margin-top: 10;
    margin-left: 10;
    margin-right: 10;
    margin-bottom: 80;
}

@sudhanshu-15
Copy link
Author

@NathanaelA Do you have an update on this? Thank you so much for looking into this.

@NathanaelA
Copy link
Owner

Nope haven't had any time... I prioritize my paid work (I'm a contractor/freelancer) over ALL free support. When I have some free time, I'll take a look at it; but any and all free work is at my own convenience.

I am willing to take pull requests for fixes; if you want to investigate the issue. ;-)

@sudhanshu-15
Copy link
Author

Sounds fair, I will try to investigate the issue.

PS: We are using a lot of your plugins and I will need to talk to my boss to see if we can work with you or at least discuss some support for the plugins, if that interests you.

@NathanaelA
Copy link
Owner

Yep, I love support contracts!

I honestly really hate seeing open issues on any of my plugins; but my wife really gets mad at me if I say yeah I fixed x, y, & z and then she says how many billable hours; uhm.... Zero... Happy wife; happy life. ;-)

@sudhanshu-15
Copy link
Author

Not sure if you made some changes but the issue is resolved after I updated to NativeScript 2.5.4

@NathanaelA
Copy link
Owner

I actually have done some revamping of the orientation plugin, as I ran into an issue that needed to be fixed. One fix that has been put into place is that it sets/clears the ".landscape" now set during the loading event rather than the loaded event, by setting the value as early as possible; it can eliminate some redraws that would have occurred.

@sudhanshu-15
Copy link
Author

Yes I believe it was the redraws. Thanks a lot for the fix. Closing this issue.

@sudhanshu-15
Copy link
Author

@NathanaelA it seems the issue is not fixed, it is still flickering on orientation change. :(

@NathanaelA NathanaelA reopened this Apr 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants