Skip to content

KeyframesView renders differently for iOS and Android #11

@RyanMitchellWilson

Description

@RyanMitchellWilson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions