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

Overflowing controls with many swiper items, ideas?

Open JulianKingman opened this issue 9 years ago • 3 comments

Any ideas or best practices for what to do with control buttons when you have more than fit on the screen? Example below: screen shot 2017-02-10 at 1 49 06 pm

JulianKingman avatar Feb 10 '17 18:02 JulianKingman

I did this:

<Swiper
      index={taskIndex}
      loadMinimal
      loadMinimalLoader={<Loading />}
      renderPagination={(index, total, context) => {
        if (total < 20) return context.renderPagination();
        return <View style={style.pagination}><Text>{`${index} / ${total}`}</Text></View>
      }}
    >

JulianKingman avatar Feb 14 '17 13:02 JulianKingman

You might want to think about changing the design and utilizing numbered pagination instead of all those dots. Just a suggestion!

chapeljuice avatar Jun 15 '17 20:06 chapeljuice

You can check if swiper greater than X make dot small. dot: { height: 4, width: 4, marginLeft:2, marginRight:2, },

<Swiper style={styles.mainContainer} index={0} loop={false} dotStyle={[styles.dot, styles.dotOpacity]} activeDotStyle={[styles.dot, styles.activeDot]} bounces >

Mamdouh-Symbyo avatar Oct 17 '17 05:10 Mamdouh-Symbyo