react-native no se muestra en Android usando Swiper

Al usar swiper, descubrí que en Android, si se usan componentes desplazables (como: FlatList, SectionList, ListView, ScrollView, etc.), swiper no se puede mostrar normalmente.

solución:

constructor (accesorios) {
     super (accesorios);
    este .estado = {
        listData : testData ,
        onRefresh : falso ,
        swiperShow : falso ,
    };
}

componentDidMount (){
     setTimeout (() => {
         this .setState({swiperShow :true });
    }, 0 )
}

renderSwiper = () => {
     if ( this .state.swiperShow){
         return (
            < Altura del deslizador = {
    150 } reproducción automática = {
    true } activeDotColor ="#fff" >
   
   
                {
   
   BANNER_LIST . map ((item, i) => {
                     return < Fuente de la imagen = {
    require ( '../../../img/banner.jpeg' )} clave = {i} estilo = {
    estilos .banner}/> ;
   
   
                })}
            </ Swiper >
        );
    } else {
         return < Ver estilo = {
    
   {altura : 150 }}></ Ver >;
    }
}

Supongo que te gusta

Origin blog.csdn.net/qq980338445/article/details/72850371
Recomendado
Clasificación