Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In android,set view zIndex,get falut,but in iOS OK #16027

Closed
jf4444 opened this issue Sep 20, 2017 · 1 comment
Closed

In android,set view zIndex,get falut,but in iOS OK #16027

jf4444 opened this issue Sep 20, 2017 · 1 comment
Assignees
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@jf4444
Copy link

jf4444 commented Sep 20, 2017

Is this a bug report?

(YES)

Have you read the Contributing Guidelines?

(YES)

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.2.0
Yarn: 0.27.5
npm: 5.4.2
Watchman: 4.7.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 2.3 AI-162.3934792

Packages: (wanted => installed)
react: ^16.0.0-alpha.12 => 16.0.0-rc.3
react-native: 0.48.1 => 0.48.1

Steps to Reproduce

(Write your steps here:)

1.I have the view a b c, set zIndex 80,70,60,
2.render flex a b c
3.i have a this.state.bool to display or hidden view c
4:change the state value

Expected Behavior

use zIndex,run OK,like IOS

Actual Behavior

when changed state value, the view a,and b disappear
the code is here:

   render() {
        if (this.props.visible === false) {
           return (
              null
          );
    }

    return (
        <View style={[{ position: 'absolute',marginTop:this.to},this.props.cStyle]}>
            <View style={[styles.container,{width:this.width,height:this.height}]}>
                <View style={ styles.loadingImage }>
                    <Image style={ styles.loadingImage } source={require('../../Resources/Gif/sp_loading.gif')}/>
                </View>
            </View>
        </View>
    );
}

but when I write code like this(not return null,renturn ),It's ok on device of android

  render() {
        if (this.props.visible === false) {
             return (
                 <View></View>
            );
    }

    return (
        <View style={[{ position: 'absolute',marginTop:this.to},this.props.cStyle]}>
            <View style={[styles.container,{width:this.width,height:this.height}]}>
                <View style={ styles.loadingImage }>
                    <Image style={ styles.loadingImage } source={require('../../Resources/Gif/sp_loading.gif')}/>
                </View>
            </View>
        </View>
    );
}

Reproducible Demo

@janicduplessis janicduplessis added Android Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. labels Sep 22, 2017
@janicduplessis janicduplessis self-assigned this Sep 22, 2017
@stale
Copy link

stale bot commented Nov 21, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 21, 2017
@stale stale bot closed this as completed Nov 28, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Issue: Author Provided Repro This issue can be reproduced in Snack or an attached project. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants