• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using Paint.STRIKE_THRU_TEXT_FLAG

 
Dov Ezra
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

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:

 
Johan Pelgrim
Ranch Hand
Posts: 105
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dov,

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?

Cheers,

Johan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic