react-native-swiper icon indicating copy to clipboard operation
react-native-swiper copied to clipboard

Pagination is displayed in the lower level of the scrollview, Covered by pictures

Open lost-xming opened this issue 7 years ago • 0 comments

Which OS ?

android

Version

Which versions are you using:

  • react-native : 0.61.1
  • react-native-swiper : 1.5.14

Expected behaviour

Pagination is displayed on the top of the scrollview ,Displayed on top of the picture

Actual behaviour

Pagination is displayed in the lower level of the scrollview ,Covered by pictures, But ios is normal

How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here. import React, {Component} from 'react'; import {Text, View, Image, Dimensions} from 'react-native'; import Swiper from 'react-native-swiper'; const {width} = Dimensions.get('window'); const loading = require('../assets/img/loading.gif'); const styles = { wrapper: { // position: 'relative', // zIndex: 9, },

         slide: {
                flex: 1,
               justifyContent: 'center',
              backgroundColor: 'transparent',
         },
         image: {
               width,
             flex: 1,
            backgroundColor: 'transparent',
         },

         loadingView: {
             position: 'absolute',
             justifyContent: 'center',
             alignItems: 'center',
             left: 0,
              right: 0,
              top: 0,
              bottom: 0,
                backgroundColor: 'rgba(0,0,0,.5)',
         },

          loadingImage: {
             width: 60,
           height: 60,
        },
   };

       const Slide = props => {
            return (
              <View style={styles.slide}>
                       <Image
                             onLoad={props.loadHandle.bind(null, props.i)}
                            style={styles.image}
                            source={{uri: props.uri}}
                       />
                      {!props.loaded && (
                            <View style={styles.loadingView}>
                            {/* <Image style={styles.loadingImage} source={loading} /> */}
                            <Text>...</Text>
                        </View>
                 )}
               </View>
            );
       };

      export default class extends Component {
              constructor(props) {
              super(props);
               this.state = {
                    imgList: [
      'https://gitlab.pro/yuji/demo/uploads/d6133098b53fe1a5f3c5c00cf3c2d670/DVrj5Hz.jpg_1',
    'https://gitlab.pro/yuji/demo/uploads/2d5122a2504e5cbdf01f4fcf85f2594b/Mwb8VWH.jpg',
    'https://gitlab.pro/yuji/demo/uploads/4421f77012d43a0b4e7cfbe1144aac7c/XFVzKhq.jpg',
    'https://gitlab.pro/yuji/demo/uploads/576ef91941b0bda5761dde6914dae9f0/kD3eeHe.jpg',
  ],
  loadQueue: [0, 0, 0, 0],
};
this.loadHandle = this.loadHandle.bind(this);

} loadHandle(i) { let loadQueue = this.state.loadQueue; loadQueue[i] = 1; this.setState({ loadQueue, }); } render() { return ( <View style={{flex: 1}}> <Swiper loadMinimal loadMinimalSize={1} showsButtons={true} style={styles.wrapper} paginationStyle={ { // zIndex: 999, } } loop={false}> {this.state.imgList.map((item, i) => ( ))} ); } }

Steps to reproduce

  1. react-native run-android

lost-xming avatar Oct 18 '19 09:10 lost-xming