Hello,

I have a listview that i populate using a adapter that implements
getView(...). In the list some items should not be selectable, i.e. no
orange background when pressed but otherwise they should be treated just
like all other clickable items. I saw a recommendation to override
areAllItemsEnabled and isEnabled(position) in the adapter. That works
fine, there is no visual feedback when the user taps the item.

Only catch is that now the listview divider is not drawn between my
disabled listview items anymore. How come? My listview is declared as
follows:

    <ListView
      android:cacheColorHint="#00000000"
      android:scrollingCache="true"
      android:alwaysDrawnWithCache="true"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:divider="@drawable/list_divider"
      android:scrollbarStyle="outsideInset"
      android:dividerHeight="1px"/>

I suppose I can manually add the list divider as an imageview to the end
of each item view instead of declaring it on the listviev. That seems a
bit blunt though, is there no better way?

-- 
Fredrik Jonson

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to