Question

I've got listview that in a row it contain 3elements: imageview, textvie and another imageview. I've set my listview to setItemsCanFocus(true) and every item is set setFocusable(false). Screen:

http://img252.imageshack.us/img252/4042/zrzutekranue.png

I can navigate on the screen (click on text/image, I have those fields set to clickable and focusable), but there is no visible focus. I'd like to have the default focus style, when background changes.

I can add sth like: setBackgroundColor(xxx) but I'd like to have that fancy background that is lighter in the middle and darker at the ends.

The upper row on the pic is what I've got, and lower is the ideal focus notification, of course it should be narrow so it would only be background of the text view.

Sorry for my English.

PS I also used for textview android:layout_height="fill_parent" to fill for height which isn't the best piece of coding.

Was it helpful?

Solution

In the List View, all the list items are in different views. In your case the Image View, Text View And Image View lies within a single View. So according to me you cannot have focus on the items within a single View in a list View.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top