Error when tapped when it is rotating automatically

Hi,

I have a problem with the sfRotator control, it turns out that when it is rotating automatically and at that moment I do a Tap or Click the application closes and without knowing the reason why it happens, what can be done about it ?, the other question is, how can I manipulate the rotation time, that is, increase the time and not use the time that the control has predetermined?

Next I copy code where I am reproducing the example:


//METODO PRINCIPAL PARA CARGAR CONTROL ROTATOR DE SYNCFUSION
    public void CargarRotatorSyncfusion() throws IOException, IndexOutOfBoundsException {
        try {
            sfRotator = new SfRotator(this);
            //TIPO DE FORMA DE PRESENTACION DE LA COLECCION DE IMAGENES.
            sfRotator.setNavigationStripMode(NavigationStripMode.Dots);
            //DESPLAZAMIENTO DE LA COLECCION DE IMAGENES.
            sfRotator.setNavigationDirection(NavigationDirection.Horizontal);
            //UBICACION DEL PUNTERO DE LA COLECCION DE LAS IMAGENES.
            sfRotator.setNavigationStripPosition(NavigationStripPosition.Bottom);
            //AUTO REPRODUCCION DE LA COLLECION.
            sfRotator.setEnableAutoPlay(true);
            //CUANDO TERMINE LA ULTIMA IMAGEN DE LA COLECCION COMENZAR DESDE EL PRIMERO DE NUEVO.
            sfRotator.setEnableLooping(true);
            ArrayList images = new ArrayList();

            //METODO PARA ALMACENAR LAS IMAGENES EN GALERIAS DE FOTOS DEL CONTROL
            for (int i = 0; i < ListImagRot.get(0).size(); i++) {
                final int finalI = i;
                //INSTANCIAMOS VARIABLE ITEM DEL CONTROL ROTATOR
                SfRotatorItem itemi = new SfRotatorItem(Tiendas_Agro_Principal.this);
                //INSTANCIAMOS VARIABLE IMAGE PARA ALMACENAR LAS IMAGENES DE LA BD
                ImageView imagei = new ImageView(Tiendas_Agro_Principal.this);
                //EVENTO CLICK PARA CADA UNO DE LAS IMAGENES DE LA GALERIA
                imagei.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Toast.makeText(Tiendas_Agro_Principal.this, "Puntero, N°: " + finalI, Toast.LENGTH_SHORT).show();
                    }
                });
                //ACCION PARA CONVERTIR LA IMAGEN QUE VIENE TIPO ENTERO A FORMATO CONTENIDO IMAGEN
                imagei.setImageBitmap(ObtenerImagenDecodeStringBitmat(ListImagRot.get(1).get(i)));
                //ACCION PARA ALMACENAR LA IMAGEN TIPO CONTENIDO
                itemi.setContent(imagei);
                //ACCION PARA AGREGAR LA IMAGEN AL ARREGLO DE LAS IMAGENES
                images.add(itemi);
            }
            //INSERTAR LAS IMAGENES DE LOS RECURSOS AL CONTROL
            sfRotator.setDataSource(images);
            LinearLayout.LayoutParams mBarParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, (AnchoPantalla / 2));
            ly_rotatorsync.setLayoutParams(mBarParams);
            ly_rotatorsync.addView(sfRotator);
        } catch (RuntimeException e) {
        }
    }

3 Replies

ET Eswaran Thirugnanasambandam Syncfusion Team November 24, 2017 11:27 AM UTC


Hi Giovanni Cuadra,

Thanks for contacting Syncfusion support.

Query1: Error when tapped when it is rotating automatically

We checked the provided sample and we are unable to reproduce the reported issue "Error when tapped when it is rotating automatically" from our side. We have created a video to demonstrate the working of rotator from the provided sample. Please find the video from the below.

Link: http://www.syncfusion.com/downloads/support/forum/134698/ze/rotator328929609  

Query2: how can I manipulate the rotation time

The rotation time of the SfRotator can be manipulated using the navigation delay property. The NavigationDelay property specifies the delay duration while switching to next navigation item, when EnableAutoPlay property is enabled. For more information please refer the below link.

Link: https://help.syncfusion.com/xamarin/sfrotator/adding-looping-and-delays?cs-save-lang=1&cs-lang=csharp#setting-navigation-delay

If the issue still persist, could you please provide more information such as

1) Which version of Essential studio are you using?.
2) In which device are you facing this issue?
3) In which Android API version the issue occurs?

It would be helpful for us to proceed further on this.

Regards,
Eswaran AT.  



GC Giovanni Cuadra November 24, 2017 03:21 PM UTC

Thanks for your help,



The sample is in xamarin, but I need to sample in Android Studio Plataform, about delay property in sfRotator.



Thanks,


ET Eswaran Thirugnanasambandam Syncfusion Team November 27, 2017 11:02 AM UTC

Hi Giovanni Cuadra,

Sorry for the inconvience caused.

The rotation time of the SfRotator can be manipulated using the navigation delay property. The NavigationDelay property specifies the delay duration while switching to next navigation item, when EnableAutoPlay property is enabled. For more information please refer the below link.

Link: https://help.syncfusion.com/android/sfrotator/features#navigation-delay

The sample code snippet is provided below:

SfRotator sfRotator = new SfRotator (this);
sfRotator.setEnableAutoPlay(true);
sfRotator.setNavigationDelay(2000);

Regards,
Eswaran AT.

Loader.
Up arrow icon