C# Класс JoanZapata.XamarinIconify.IconDrawable

Embed an icon into a Drawable that can be used as TextView icons, or ActionBar icons.
 new IconDrawable(context, IconValue.icon_star) .WithColorRes(R.WithColor.white) .WithActionBarSize(); 
If you don't set the _size of the drawable, it will use the _size that is given to him. Note that in an ActionBar, if you don't set the _size explicitly it uses 0, so please use WithActionBarSize().
Наследование: Android.Graphics.Drawables.Drawable
Показать файл Открыть проект

Открытые методы

Метод Описание
ClearColorFilter ( ) : void
Draw ( Android.Graphics.Canvas canvas ) : void
IconDrawable ( Android.Content.Context context, Icon icon ) : System

Create an IconDrawable.

IconDrawable ( Android.Content.Context context, object iconKey ) : System

Create an IconDrawable.

IconDrawable ( Android.Content.Context context, string iconKey ) : System

Create an IconDrawable.

SetAlpha ( int alpha ) : void
SetColorFilter ( Android.Graphics.ColorFilter cf ) : void
SetState ( int stateSet ) : bool
WIthSizeDp ( int size ) : IconDrawable

Set the size of the drawable.

WithActionBarSize ( ) : IconDrawable

Set the size of this icon to the standard Android ActionBar.

WithAlpha ( int alpha ) : IconDrawable

Set the WithAlpha of this drawable.

WithColor ( Color color ) : IconDrawable

Set the Color of the drawable.

WithColorRes ( int colorRes ) : IconDrawable

Set the Color of the drawable.

WithSizePx ( int size ) : IconDrawable

Set the size of the drawable.

WithSizeRes ( int dimenRes ) : IconDrawable

Set the size of the drawable.

Приватные методы

Метод Описание
ConvertDpToPx ( Android.Content.Context context, float dp ) : int
Init ( Android.Content.Context context, Icon icon ) : void
isEnabled ( int stateSet ) : bool

Описание методов

ClearColorFilter() публичный Метод

public ClearColorFilter ( ) : void
Результат void

Draw() публичный Метод

public Draw ( Android.Graphics.Canvas canvas ) : void
canvas Android.Graphics.Canvas
Результат void

IconDrawable() публичный Метод

Create an IconDrawable.
public IconDrawable ( Android.Content.Context context, Icon icon ) : System
context Android.Content.Context Your activity or application context.
icon Icon The icon you want this drawable to display.
Результат System

IconDrawable() публичный Метод

Create an IconDrawable.
if the key doesn't match any icon.
public IconDrawable ( Android.Content.Context context, object iconKey ) : System
context Android.Content.Context Your activity or application context.
iconKey object The icon key you want this drawable to display. Calls iconKey.ToString() method internally to get icon name
Результат System

IconDrawable() публичный Метод

Create an IconDrawable.
if the key doesn't match any icon.
public IconDrawable ( Android.Content.Context context, string iconKey ) : System
context Android.Content.Context Your activity or application context.
iconKey string The icon key you want this drawable to display.
Результат System

SetAlpha() публичный Метод

public SetAlpha ( int alpha ) : void
alpha int
Результат void

SetColorFilter() публичный Метод

public SetColorFilter ( Android.Graphics.ColorFilter cf ) : void
cf Android.Graphics.ColorFilter
Результат void

SetState() публичный Метод

public SetState ( int stateSet ) : bool
stateSet int
Результат bool

WIthSizeDp() публичный Метод

Set the size of the drawable.
public WIthSizeDp ( int size ) : IconDrawable
size int The _size in density-independent pixels (dp).
Результат IconDrawable

WithActionBarSize() публичный Метод

Set the size of this icon to the standard Android ActionBar.
public WithActionBarSize ( ) : IconDrawable
Результат IconDrawable

WithAlpha() публичный Метод

Set the WithAlpha of this drawable.
public WithAlpha ( int alpha ) : IconDrawable
alpha int The WithAlpha, between 0 (transparent) and 255 (opaque).
Результат IconDrawable

WithColor() публичный Метод

Set the Color of the drawable.
public WithColor ( Color color ) : IconDrawable
color Color The WithColor, usually from android.graphics.Color or 0xFF012345.
Результат IconDrawable

WithColorRes() публичный Метод

Set the Color of the drawable.
public WithColorRes ( int colorRes ) : IconDrawable
colorRes int The WithColor resource id, from your Resource class.
Результат IconDrawable

WithSizePx() публичный Метод

Set the size of the drawable.
public WithSizePx ( int size ) : IconDrawable
size int The _size in pixels (px).
Результат IconDrawable

WithSizeRes() публичный Метод

Set the size of the drawable.
public WithSizeRes ( int dimenRes ) : IconDrawable
dimenRes int The dimension resource.
Результат IconDrawable