I am creating a compound control and using a TypedArray to retrieve the values from attrs.xml as follows:
TypedArray ta = context.ObtainStyledAttributes(attrs, Resource.Styleable.CircleButton);
One of the values in attrs.xml is the following:
<attr name="LabelTextColor" format="color"/>
When retrieving this value, the GetColor method asks for a second parameter as the default value, which I want to be a color from my color resources in colors.xml. However, because this parameter is an integer, I'm not quite sure what to use. My first thought was the following:
However, I'm not entirely sure if this is correct (I am still adjusting to Xamarin.Android's resource system). Will this do what I want, or do I need to specify the default value in some other way? Thanks.