Mathieu69 Posted July 6, 2011 Share Posted July 6, 2011 Bonjour, J'ai un petit problème lors du développement de mon application android : j'ai un onItemClick qui ne fonctionne pas. En fait, quand je "click" sur ma listView, rien ne se passe et je ne comprend pas... Voici mon code : public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); setContentView(R.layout.articles); ListView lvListe = new ListView(Article.this); lvListe = (ListView)findViewById(R.id.lvListe); progressDialog = new ProgressDialog(this); getServerData(); adapter = new ArticleAbregeAdapter(this, maBibliotheque); lvListe.setAdapter(adapter); adapter.notifyDataSetChanged(); lvListe.setTextFilterEnabled(true); lvListe.setOnItemClickListener(this); registerForContextMenu(lvListe); } public void onItemClick(AdapterView<?> a, View v, int position, long id) { afficheArticle(((ArticleAbrege) lvListe.getItemAtPosition(position)), position); } et ma classe implements bien OnItemClickListener... Donc si quelqu'un pouvait m'éclairer, ce serait cool ;) HELP please^^ Link to comment Share on other sites More sharing options...
jokamax Posted July 7, 2011 Share Posted July 7, 2011 Ajoute déjà @Override au dessus de la fonction onItemClick. Ensuite ajoute du debug : Affiche un message dans les log ou un toast pour voir si c pas ta fonction afficheArticle qui ne marche pas Jok Link to comment Share on other sites More sharing options...
Mathieu69 Posted July 7, 2011 Author Share Posted July 7, 2011 Merci, mais en fait, j'ai trouvé mon erreur : c'est à cause des WebView à l'intérieur de mon ListView!!! Mais merci encore ;) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.