leecade / leecade/react-native-swiper

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

Open
#1,087 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Resolution: Old Version
Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the example in the examples folder and run it on Android using the reported React Native and react-native-swiper versions. Inspect how the Swiper pagination is layered relative to the image and scroll view. Done means the pagination appears above the images on Android while the existing iOS behavior remains normal.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.