I want to code an app that display a set of Items in a list view.
if an item is broken, I want its name to have a strike-thrue line and a red background. for non broken
items, their name will have a blue background and no strike lines.
I tried to use the fallowing code in my ListAdapter.getView() to set the strike line and the background color. the result is that some items have a red background and a line, some with blue bg and line, and some have only blue background.
I don't understand how items can have both strike line and blue background. this method is the only place in my app that set strike line
Here is my code:
Only thing I can think of -- from the behavior that you are describing -- is that you don't re-initialize the txt_caption object in every cycle, but I can't deduce that from your code snippet. Could you maybe create a small project which isolates your problem and make that available somewhere?
Johan Pelgrim, The Netherlands
SCJP 1.4, SCWCD 1.4, SCBCD 5.0
subject: problem using Paint.STRIKE_THRU_TEXT_FLAG