Last active
August 29, 2015 13:59
-
-
Save bjorncoltof/10596587 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public StylablePagerTabStrip(Context context, IAttributeSet attrs) | |
: base(context, attrs) | |
{ | |
var styledAttributes = context.ObtainStyledAttributes(attrs, Resource.Styleable.StylablePagerTabStrip); | |
// Style 1 | |
for (var i = 0; i < styledAttributes.IndexCount; ++i) | |
{ | |
var index = styledAttributes.GetIndex(i); | |
switch (index) | |
{ | |
case Resource.Styleable.StylablePagerTabStrip_indicatorColor: | |
TabIndicatorColor = styledAttributes.GetColor(index, Android.Resource.Color.White); | |
break; | |
} | |
} | |
// Style 2 | |
TabIndicatorColor = styledAttributes.GetColor(Resource.Styleable.StylablePagerTabStrip_indicatorColor, | |
Android.Resource.Color.White); | |
styledAttributes.Recycle(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment