本文整理汇总了C#中Resources.GetDrawable方法的典型用法代码示例。如果您正苦于以下问题:C# Resources.GetDrawable方法的具体用法?C# Resources.GetDrawable怎么用?C# Resources.GetDrawable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources.GetDrawable方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNormalBackground
public static Android.Graphics.Drawables.Drawable GetNormalBackground(Resources res, Station station)
{
switch (station.UsedActivityType)
{
case ActivityType.Dumbbells:
return res.GetDrawable(Resource.Drawable.bg_dumbbells_normal);
case ActivityType.Rowing:
return res.GetDrawable(Resource.Drawable.bg_rowing_normal);
case ActivityType.Cycling:
return res.GetDrawable(Resource.Drawable.bg_rowing_normal);
case ActivityType.BenchPress:
case ActivityType.Undefined:
default:
return res.GetDrawable(Resource.Drawable.bg_normal);
}
}
示例2: ClingDrawer
public ClingDrawer(Resources resources, Color showcaseColor)
{
this.showcaseColor = showcaseColor;
PorterDuffXfermode mBlender = new PorterDuffXfermode(PorterDuff.Mode.Clear);
mEraser = new Paint();
mEraser.Color = Color.White;
mEraser.Alpha = 0;
mEraser.SetXfermode(mBlender);
mEraser.AntiAlias = true;
mShowcaseDrawable = resources.GetDrawable(Resource.Drawable.cling_bleached);
mShowcaseDrawable.SetColorFilter(showcaseColor, PorterDuff.Mode.Multiply);
}
示例3: GetDrawable
public Drawable GetDrawable(Resources res)
{
return res.GetDrawable (resID);
}
示例4: GetValue
public override object GetValue(Resources resources, int resourceId, Type memberType)
{
return resources.GetDrawable(resourceId);
}
示例5: GetIconDrawable
public Drawable GetIconDrawable(Resources res, PwIcon icon)
{
int resId = Icons.IconToResId (icon);
Drawable draw;
if (!_standardIconMap.TryGetValue(resId, out draw))
{
draw = res.GetDrawable(resId);
_standardIconMap[resId] = draw;
}
return draw;
}
示例6: InitBlank
private static void InitBlank(Resources res)
{
if (_blank == null) {
_blank = res.GetDrawable (Resource.Drawable.ic99_blank);
_blankWidth = _blank.IntrinsicWidth;
_blankHeight = _blank.IntrinsicHeight;
}
}
示例7: GetIconDrawable
public Drawable GetIconDrawable(Resources res, PwDatabase db, PwIcon icon, PwUuid customIconId)
{
return res.GetDrawable(Resource.Drawable.Icon);
}