Code example for ColorStateList

Methods: getColorForState

0
	} 
 
	@Override 
	protected boolean onStateChange(final int[] stateSet) {
		if (mColorMode == COLOR_MODE_COLOR_STATE_LIST) {
			final int pinColor = (mPinColorStateList != null) ? mPinColorStateList.getColorForState(stateSet, Color.BLACK)
					: Color.BLACK;
			if (mCurrentPinColor != pinColor) {
				mCurrentPinColor = pinColor;
				mNeedRebuild = true;
				return true; 
			} 
		} 
		return false; 
	} 
 
	@Override 
	public void draw(final Canvas canvas) {
		if (mNeedRebuild) {
 
			if (mMapPin == null) {