0
What may be causing slowness?
Code of Adaptador
:
public class Adaptador extends BaseAdapter{
private static LayoutInflater inflater = null;
Context contexto;
String[][] datos;
int[] datosImg;
public Adaptador(Context conexto, String[][] datos, int[] imagenes)
{
this.contexto = conexto;
this.datos = datos;
this.datosImg = imagenes;
inflater = (LayoutInflater)conexto.getSystemService(conexto.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int i, View convertView, ViewGroup parent) {
final View vista = inflater.inflate(R.layout.elemento_lista, null);
TextView titulo = (TextView) vista.findViewById(R.id.tvTitulo);
TextView duracion = (TextView) vista.findViewById(R.id.tvDuracion);
TextView director = (TextView) vista.findViewById(R.id.tvDirector);
ImageView imagen = (ImageView) vista.findViewById(R.id.ivImagen);
RatingBar calificacion = (RatingBar) vista.findViewById(R.id.ratingBarPel);
titulo.setText(datos[i][0]);
director.setText(datos[i][1]);
duracion.setText("Duração " + datos[i][2]);
imagen.setImageResource(datosImg[i]);
calificacion.setProgress(Integer.valueOf(datos[i][3]));
return vista;
}
@Override
public int getCount() {
return datosImg.length;
}
@Override
public Object getItem(int position) {
return null;
}
@Override
public long getItemId(int position) {
return 0;
}
}
Testing the app where? right on mobile or desktop?
– Renan
I tested in Mobile and Emulator
– gta sandro