But tit is not null. In other function I load this function I dont have any field null
for (i=0; i<tit.size(); i++){ Log.d("PRUEBA", "vamos a ver si hay nulo ... " + tit.get(i)); } 04-20 18:10:43.596: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Documentales Culturales - 14:35 04-20 18:10:43.596: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Imaginantes - 15:25 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Saber y ganar - 15:30 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Grandes documentales - 16:00 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Documentales Culturales - 17:55 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Biodiario - 18:55 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Ciudades para el siglo XIX - 19:00 04-20 18:10:43.606: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Redes 2.0 - 19:30 04-20 18:10:43.666: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... La 2 Noticias - 20:00 04-20 18:10:43.666: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Imaginantes - 20:25 04-20 18:10:43.666: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Nostromo - 00:50 04-20 18:10:43.701: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... ZZZ - 01:50 04-20 18:10:43.706: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Documentales culturales - 01:55 04-20 18:10:43.706: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Conciertos de Radio 3 - 02:45 04-20 18:10:43.716: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Nostromo - 03:20 04-20 18:10:43.716: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Redes 2.0 - 04:20 04-20 18:10:43.746: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Mapa Sonoro - 05:05 04-20 18:10:43.746: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... That´s English - 06:30 04-20 18:10:43.756: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Conciertos de Radio 3 - 07:00 04-20 18:10:43.756: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Grandes Documentales - 07:30 04-20 18:10:43.756: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Biodiario - 08:25 04-20 18:10:43.776: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... + De España - 08:30 04-20 18:10:43.776: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Biodiario - 09:25 04-20 18:10:43.786: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Aqui hay trabajo - 09:30 04-20 18:10:43.786: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... La aventura del Saber - 10:00 04-20 18:10:43.786: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Accion Directa - 11:00 04-20 18:10:43.786: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Para Todos La 2 - 11:30 04-20 18:10:43.786: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Redes 2.0 - 13:10 04-20 18:10:43.816: DEBUG/PRUEBA(1274): vamos a ver si hay nulo ... Dias de Cine - 04:15 On 20 abr, 20:06, Kumar Bibek <coomar....@gmail.com> wrote: > My guess, variable tit is null. > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com > > On Wed, Apr 20, 2011 at 11:35 PM, ABSOLUT <davidt...@gmail.com> wrote: > > The line is: > > holder.programa.setText(tit.get(position)); > > But I dont know why say that is null > > > On 20 abr, 19:48, Kumar Bibek <coomar....@gmail.com> wrote: > > > java.lang.NullPointerException > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at com.es.tele.tele > > > $listaAdaptador.getView(tele. > > > java:425) > > > > Look at line number 425 in tele.java > > > > Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com > > > > On Wed, Apr 20, 2011 at 11:13 PM, ABSOLUT <davidt...@gmail.com> wrote: > > > > Hi, > > > > > In one of my projects I've got a ListView with some elements. But when > > > > scrolling through this list I get the following error: > > > > 04-20 17:40:23.056: WARN/dalvikvm(1061): threadid=1: thread exiting > > > > with uncaught exception (group=0x40015560) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): FATAL EXCEPTION: main > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): > > > > java.lang.NullPointerException > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at com.es.tele.tele > > > > $listaAdaptador.getView(tele.java:425) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.AbsListView.obtainView(AbsListView.java:1409) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.ListView.makeAndAddView(ListView.java:1745) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.ListView.fillDown(ListView.java:670) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.ListView.fillGap(ListView.java:641) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.AbsListView.trackMotionScroll(AbsListView.java:3399) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.AbsListView.onTouchEvent(AbsListView.java:2233) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.widget.ListView.onTouchEvent(ListView.java:3446) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.View.dispatchTouchEvent(View.java:3885) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:903) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:942) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > com.android.internal.policy.impl.PhoneWindow > > > > $DecorView.superDispatchTouchEvent(PhoneWindow.java:1691) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java: > > > > 1125) > > > > 04-20 17:40:23.116: ERROR/AndroidRuntime(1061): at > > > > android.app.Activity.dispatchTouchEvent(Activity.java:2096) > > > > > My adapter is: > > > > > class listaAdaptador extends ArrayAdapter<String> { > > > > listaAdaptador() { > > > > > super(tele.this, R.layout.row,R.id.programa,tit); > > > > > } > > > > public View getView(int position, View convertView, > > > > ViewGroup parent) { > > > > > View row = convertView; > > > > ViewHolder holder; > > > > > if(row == null) > > > > { > > > > LayoutInflater inflater = getLayoutInflater(); > > > > row = inflater.inflate(R.layout.row, null); > > > > holder = new ViewHolder(); > > > > holder.programa = > > > > (TextView)row.findViewById(R.id.programa); > > > > > } > > > > else { > > > > > holder = (ViewHolder)row.getTag(); > > > > > } > > > > > holder.programa.setText(tit.get(position)); > > > > > ImageView icon=(ImageView)row.findViewById(R.id.icon); > > > > > if (tabhost.getCurrentTab() == 0){ > > > > Log.d("PRUEBA", "Cargamos el primer canal"); > > > > icon.setImageResource(R.drawable.la1); > > > > } > > > > if (tabhost.getCurrentTab() == 1){ > > > > Log.d("PRUEBA", "Cargamos el segundo canal"); > > > > icon.setImageResource(R.drawable.la2); > > > > } > > > > > if (tabhost.getCurrentTab() == 2){ > > > > Log.d("PRUEBA", "Cargamos el primer canal"); > > > > icon.setImageResource(R.drawable.antena3); > > > > } > > > > if (tabhost.getCurrentTab() == 3){ > > > > Log.d("PRUEBA", "Cargamos el segundo canal"); > > > > icon.setImageResource(R.drawable.cuatro); > > > > } > > > > > if (tabhost.getCurrentTab() == 4){ > > > > Log.d("PRUEBA", "Cargamos el primer canal"); > > > > icon.setImageResource(R.drawable.telecinco); > > > > } > > > > if (tabhost.getCurrentTab() == 5){ > > > > Log.d("PRUEBA", "Cargamos el segundo canal"); > > > > icon.setImageResource(R.drawable.sexta); > > > > } > > > > > if (tabhost.getCurrentTab() == 6){ > > > > Log.d("PRUEBA", "Cargamos el primer canal"); > > > > icon.setImageResource(R.drawable.marca); > > > > } > > > > > return(row); > > > > } > > > > } > > > > static class ViewHolder { > > > > TextView programa; > > > > > } > > > > > I dont see any null field in the arrayList "tit" > > > > > Could you help me please? > > > > Many thanks and sorry for my english! > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en