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) {
}
}