Mathieu69 Posted July 5, 2011 Share Posted July 5, 2011 Bonjour, Ba voilà tout est dans le titre... Je développe actuellement une application pour android, mais lorsque je la teste une erreur survient. Voici mon code : public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.videos); lvListe = (ListView)findViewById(R.id.listeVideo); lvListe2 = (ListView)findViewById(R.id.listeVideo2); getServerData(strURL); VideoAdapter adapter = new VideoAdapter(this, maBibliotheque); lvListe.setAdapter(adapter); adapter.notifyDataSetChanged(); lvListe.setTextFilterEnabled(true); lvListe.setOnItemClickListener(this); registerForContextMenu(lvListe); VideoAdapter adapter2 = new VideoAdapter(this, maBibliotheque2); lvListe2.setAdapter(adapter2); adapter2.notifyDataSetChanged(); lvListe2.setTextFilterEnabled(true); lvListe2.setOnItemClickListener(this); registerForContextMenu(lvListe2); // session = (Session) getIntent().getSerializableExtra("session"); // ListView lvListe = new ListView(Videos.this); } L'erreur survient au niveau de la ligne lvListe.setAdapter(adapter); Si quelqu'un peut m'aiguiller je lui en serait reconnaissant Mathieu A noter que celà a marché pendant un instant (j'ai pu avoir le résultat deux fois) et depuis plus rien... Link to comment Share on other sites More sharing options...
ChrOnOs Posted July 6, 2011 Share Posted July 6, 2011 R.id.listeVideo existe peut-être dans un autre layout que R.layout.videos Si lvListe est null, lvListe = (ListView)findViewById(R.id.listeVideo); a foiré. Link to comment Share on other sites More sharing options...
Mathieu69 Posted July 6, 2011 Author Share Posted July 6, 2011 Oui merci ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.