In Native Android development you would use the following code in order to create the ColorStateList programmatically:
int[][] states = new int[][] {
new int[] { android.R.attr.state_enabled}, // enabled
new int[] {-android.R.attr.state_enabled}, // disabled
new int[] {-android.R.attr.state_checked}, // unchecked
new int[] { android.R.attr.state_pressed} // pressed
};
int[] colors = new int[] {
Color.BLACK,
Color.RED,
Color.GREEN,
Color.BLUE
};
ColorStateList myList = new ColorStateList(states, colors);
But in Xamarin.Android there are no states after Resource.Attribute. Is this not yet implemented or is there something else I need to include in the project?
Thank you.