Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

variable in xml layout

 
simone giusti
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I need to change background color in listview item, based on a variable value.



How can ho do that ?

I have an hashmap reporting CUENAME and BACKGROUNDCOLOR (@myvalue)
 
Darryl A. J. Staflund
Ranch Hand
Posts: 314
2
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

If the variable is going to take on different values at runtime, then I think you'll have to change your background programmatically using something like the following:



Hope this helps.
Darryl
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic