I have a list view inside a dialog fragment. The list view works fine and is being set in onActivityCreated(). E.g.
SimpleAdapter adapter = new SimpleAdapter(getActivity(), list,
R.layout.dialog_list_row, from, to);
mListView.setAdapter(adapter);
However, I’m not understanding why once I’ve added the adapter (as above) to my listview, why can’t I access the children. E.g.
mListView.getChildAt(0).setEnabled(false);
I am performing this change to the list item in onResume().
The simplest solution is to quickly extend your adapter to return the proper value in isEnabled and areAllItemsEnabled.
Enabling the view won’t work properly because of the view recycling in android.
edit
a little code :
This simply disables the first item of the list. AFAIK, this is the proper way.