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

KeyframesView renders differently for iOS and Android #11

Open
RyanMitchellWilson opened this issue Jul 6, 2017 · 0 comments
Open

KeyframesView renders differently for iOS and Android #11

RyanMitchellWilson opened this issue Jul 6, 2017 · 0 comments

Comments

@RyanMitchellWilson
Copy link

I have the same code running on both iOS and Android and they are rendering differently.

screen shot 2017-07-06 at 4 06 34 pmscreen shot 2017-07-06 at 4 06 44 pm

As you can see, the Android one is much larger than the iOS one. Here is my code:

import React, {Component} from 'react'
import {View} from 'react-native'
import KeyframesView from 'react-native-facebook-keyframes'

export default class extends Component {
  constructor(props) {
    super(props)
    this.state = {
      paused: true,
      seek: null
    }
  }

  componentDidMount() {
    setTimeout(() => {
      this.setState({seek: 0.0}, () => this.setState({paused: false}))
    }, 1)
  }

  render() {
    const defaultStyle = {
      height: 100,
      width: 100
    }
    return (
      <View style={{backgroundColor: 'red'}}>
        <KeyframesView
          paused={this.state.paused}
          seek={this.state.seek}
          style={defaultStyle}
          src={require('../../resources/animations/burger.json')}/>
      </View>
    )
  }
}

react: 16.0.0-alpha.6
react-native: 0.44.0
iOS 10
Android 7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant