Android: onListItemClick in Activity?

A listItemClickListener is attached to a listview. When you changed fromListActivity to Activity, your class no longer has a view associated with it and thus an Activity class has no idea what to do with an onListItemClickListener.

For a non-ListActivity to have an item-clicked-listener for a list, you have to call the setOnItemClickedListener method on the ListView (you may need to get that using findViewById if it's coming from XML). Rather than just overriding ListActivity's onListItemClickListener, here you'd have your invoking activity implement AdapterView. OnItemClickedListener and pass it as the parameter to setOnItemClickedListener.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions