7772 / react-native-image-swiper

A Simple Images Slider using react-native-swiper
0 stars 0 forks source link

ViewPagerAndroid has been remove from React-native #1

Open SaGaR1084 opened 4 years ago

SaGaR1084 commented 4 years ago

ViewPagerAndroid has been remove from React-native show me this error in android

My Code:-

import React, { Component } from 'react';
import {
  StyleSheet,
  View,
  StatusBar,
  TouchableOpacity,
  Image,
  Dimensions,
  Platform,
} from 'react-native';

import ImagesSwiper from "react-native-image-swiper";
import HelperConstent from '../../Helpers/HelperConstant';
import ImageHelper from '../../Helpers/ImageHelper';

const {
  ColorLight,
  ColorWight
} = HelperConstent;

const {
  BackIcon,
} = ImageHelper;

const customImg = [
  "https://firebasestorage.googleapis.com/v0/b/lotapp-9e84d.appspot.com/o/aster.jpg?alt=media&token=166e66b0-9c8e-4803-918e-25762c58dbda",
  "https://firebasestorage.googleapis.com/v0/b/lotapp-9e84d.appspot.com/o/fan.jpg?alt=media&token=b419d507-9de8-4c4c-97e3-6b4eb2202e68",
  "https://firebasestorage.googleapis.com/v0/b/lotapp-9e84d.appspot.com/o/stone.jpg?alt=media&token=e9d41537-7f26-4bfd-86eb-c2ef6fc58a9c"
];

const { width, height } = Dimensions.get('window');

class Home extends Component {

  render() {
    const { container, } = styles;
    return (
      <View style={container}>
        <StatusBar barStyle='light-content' backgroundColor={ColorLight} />
        <View style={{backgroundColor: 'red', flex: 1, marginTop: height/10 }}>
        <ImagesSwiper
          images={customImg}
          width={width}
          height={height - 100}
        />
        </View>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: ColorLight,
  },
  HeaderView: {
    top: Platform.OS === 'ios' ? 100 : 0,
    position: 'absolute',
    flexDirection: 'row',
    width: '100%',
  },
  backIconImageView: {
    height: 35,
    width: 35,
    marginLeft: 5,
    justifyContent: 'center',
    alignSelf: 'center',
    zIndex: 100,
    elevation: 100,
  },
  backIconImage: {
    height: 30,
    width: 30,
    tintColor: ColorWight,
    justifyContent: 'center',
    alignSelf: 'center'
  },
});

export default Home;

Screenshot 2020-01-03 at 1 00 58 PM

christian-hess-94 commented 2 years ago

Does this work in the most current version of React Native?