Win a copy of hapi.js in Action this week in the HTML, CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

variable in xml layout

 
simone giusti
Ranch Hand
Posts: 45
  • 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
Boost this thread!