public PlayPauseView(Context context) : base(context) { mPlayBackgroundColor = Color.Blue; mPauseBackgroundColor = Color.Cyan; Color fillColor = Color.White; mDrawable = new PlayPauseDrawable(fillColor); init(context); }
public PlayPauseView(Context context, IAttributeSet attrs) : base(context, attrs) { TypedArray a = context.Theme.ObtainStyledAttributes( attrs, Resource.Styleable.PlayPauseView, 0, 0); int fillColor; try { mPlayBackgroundColor = a.GetColor(Resource.Styleable.PlayPauseView_play_bg, Color.Blue); mPauseBackgroundColor = a.GetColor(Resource.Styleable.PlayPauseView_pause_bg, Color.Cyan); fillColor = a.GetColor(Resource.Styleable.PlayPauseView_fill_color, Color.White); } finally { a.Recycle(); } mDrawable = new PlayPauseDrawable(new Color(fillColor)); init(context); }