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
파일 보기 프로젝트 열기: PragmaticIT/xiconify

공개 메소드들

메소드 설명
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