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

Show numbers instead of dots? #3

Closed
aksonov opened this issue Apr 24, 2015 · 6 comments
Closed

Show numbers instead of dots? #3

aksonov opened this issue Apr 24, 2015 · 6 comments

Comments

@aksonov
Copy link

aksonov commented Apr 24, 2015

Great component! It would be good to have X/Y (X current page / Y total pages) customizable label string instead of dots for big lists.

@leecade
Copy link
Owner

leecade commented Apr 24, 2015

thanks, @aksonov

For custom label string with X/Y, my option is add a prop pagination(function type), like:

var renderPagination = function(index, total) {
  return <View style={{}}><Text>{index}/{total}</Text></View>
}
<Swiper pagination={renderPagination}>
        <View style={styles.slide1}>
          <Text style={styles.text}>Hello Swiper</Text>
        </View>
      </Swiper>

And your opinion?

@aksonov
Copy link
Author

aksonov commented Apr 25, 2015

Sounds great!

Sent from my iPhone

On 24 апр. 2015, at 22:09, 斯人 notifications@github.com wrote:

thanks, Now the dot prop allow to custom element.

like:

<View style={{backgroundColor:'rgba(0,0,0,.2)', width: 8, height: 8,borderRadius: 4, marginLeft: 3, marginRight: 3, marginTop: 3, marginBottom: 3,}} />
For custom label string with X/Y, my option is allow dot / activeDot props supports function type, like:

var renderDot = function(index, total) {
return {index}/{total}
}


Hello Swiper


And your opinion?


Reply to this email directly or view it on GitHub.

@leecade
Copy link
Owner

leecade commented Apr 25, 2015

OK. CI later

@leecade
Copy link
Owner

leecade commented Apr 28, 2015

Sorry so late @aksonov , Now there is a new prop renderPagination done.

see https://github.com/leecade/react-native-swiper/blob/master/examples/examples/swiper_number.js

Update doc later, thanks your idea.

TFsky pushed a commit to TFsky/react-native-swiper that referenced this issue Mar 14, 2018
…upportAndroid

Revert "Revert "Feature/support android""
@smithaitufe
Copy link

smithaitufe commented Mar 29, 2018

What if I need a custom pagination but also wants to render dots?

@Hari70a
Copy link

Hari70a commented Jan 22, 2019

@leecade and @smithaitufe
I also want both custom pagination and render dots. Is it possible?

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

4 participants