3

Ii have the following code:

 <shape xmlns:android="http://schemas.android.com/apk/res/android"    
            xmlns:local="http://schemas.android.com/apk/res-auto"> 
     <solid android:color="#000000" /> 
   ... 
 </shape> 

How can I do color Binding for 'android:color="#000000"'?

this drawable is referenced from a binded view.

Thanx

cheziHoyzer
  • 4,803
  • 12
  • 54
  • 81

1 Answers1

0

I think this is possible to do. However, the exact technique to use will depend on the complete code within you drawable, and also how your drawable is used.

If you look at Android/Java questions like Change drawable color programmatically and Set android shape color programmatically then they will give you some ideas how to achieve your effect - but the exact technique to use will depend on your individual scenario.

As a first stage I would suggest prototyping with some code behind to get the color changing working - this can then easily be hooked up to a C# View Property which can be data-bound.

Community
  • 1
  • 1
Stuart
  • 66,722
  • 7
  • 114
  • 165