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

Change toggleButton color

 
John Joe
Ranch Hand
Posts: 55
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to change the color of toggleButton in listView? I use done.png as toggleButton image. When it is clicked, it will turn to green,otherwise it remains red. However it always shows the original color which is white !

Please help me. Thanks.

This is how I deigned my toggleButton



selector



toggle_on



toggle_off



MyActivity



 
John Joe
Ranch Hand
Posts: 55
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone here can help   
 
Brian Tkatch
Bartender
Posts: 567
25
Linux Notepad Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure that's the correct attribute? ToggleButton shows inherited attributes From class android.widget.CompoundButton which include color in the name, but i do not see android:color.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic