String[] from = new String[]{bdl.ID_NOMBRE, bdl.ID_LATITUD, bdl.ID_LONGITUD, bdl.ID_FILA};
int[] to = new int[]{R.id.tvNombre, R.id.tvLatitud, R.id.tvLongitud, R.id.tvIdentif};
cursorLocdeEmergEnviar = bdl.cargarCursorLocalizacion();
miAdapterLocDeEmergEnviar= new SimpleCursorAdapter(this, R.layout.item_lista_loc, cursorLocdeEmergEnviar, from, to, 0);
lvEnviar.setAdapter(miAdapterLocDeEmergEnviar);
--
Para participar es necesario que leas detenidamente las normas del grupo: http://goo.gl/8h8ez2
---
Has recibido este mensaje porque estás suscrito al grupo "desarrolladores-android" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus mensajes, envía un correo electrónico a desarrolladores-a...@googlegroups.com.
Para publicar en este grupo, envía un correo electrónico a desarrollad...@googlegroups.com.
Visita este grupo en http://groups.google.com/group/desarrolladores-android.
Para ver esta conversación en el sitio web, visita https://groups.google.com/d/msgid/desarrolladores-android/e403f710-fc75-44cf-ab68-330a28dc0b29%40googlegroups.com.
Para acceder a más opciones, visita https://groups.google.com/d/optout.
Mira este link, esta explicado.
public class ItemAdapter extends BaseAdapter {
private final Typeface tf;
private Context context;
private List<Item> items;
public ItemAdapter(Context context, List<Item> items) {
this.context = context;
this.items = items;
this.tf = Typeface.createFromAsset(context.getAssets(), "fonts/fuente.ttf"); //fuente, ubicada en assets/font/fuente.ttf.
}
@Override
public int getCount() {
return this.items.size();
}
@Override
public Object getItem(int position) {
return this.items.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View rowView = convertView;
if (convertView == null) {
// Create a new view into the list.
LayoutInflater inflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
rowView = inflater.inflate(R.layout.list_item, parent, false);
// Set data into the view.
ImageView ivItem = (ImageView) rowView.findViewById(R.id.ivItem);
TextView tvTitle = (TextView) rowView.findViewById(R.id.tvTitle);
Item item = this.items.get(position);
tvTitle.setTypeface(tf);
tvTitle.setText(item.getTitle());
ivItem.setImageResource(item.getImage());
}
return rowView;
}
}