I have a listview that I want to add event listener to it. The following simple code exits with "Source Not Found" when debugging.
I remembered using exactly the same code for Button object and it did not caused any problem.
mArticleList = (ListView)findViewById(R.id.ArticleList);
populateArticleList();
mArticleList.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
launchFullArticle();
;
}
});
protected void launchFullArticle() {
// TODO Auto-generated method stub
Context context = getApplicationContext();
CharSequence text = "Hello toast!";
int duration = Toast.LENGTH_SHORT;
Toast toast = Toast.makeText(context, text, duration);
toast.show();
}