C# 클래스 com.joanzapata.iconify.IconDrawable

Embed an icon into a Drawable that can be used as TextView icons, or ActionBar icons.
 new IconDrawable(context, IconValue.icon_star) .colorRes(R.color.white) .actionBarSize(); 
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 actionBarSize().
상속: android.graphics.drawable.Drawable
파일 보기 프로젝트 열기: PragmaticIT/xiconify

공개 메소드들

메소드 설명
IconDrawable ( android.content.Context context, Icon icon ) : android.graphics

Create an IconDrawable.

IconDrawable ( android.content.Context context, string iconKey ) : android.graphics

Create an IconDrawable.

actionBarSize ( ) : IconDrawable

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

alpha ( int alpha ) : IconDrawable

Set the alpha of this drawable.

clearColorFilter ( ) : void
color ( int color ) : IconDrawable

Set the color of the drawable.

colorRes ( int colorRes ) : IconDrawable

Set the color of the drawable.

draw ( Canvas canvas ) : void
setState ( int stateSet ) : bool
sizeDp ( int size ) : IconDrawable

Set the size of the drawable.

sizePx ( int size ) : IconDrawable

Set the size of the drawable.

sizeRes ( 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

메소드 상세

IconDrawable() 공개 메소드

Create an IconDrawable.
public IconDrawable ( android.content.Context context, Icon icon ) : android.graphics
context android.content.Context Your activity or application context.
icon Icon The icon you want this drawable to display.
리턴 android.graphics

IconDrawable() 공개 메소드

Create an IconDrawable.
if the key doesn't match any icon.
public IconDrawable ( android.content.Context context, string iconKey ) : android.graphics
context android.content.Context Your activity or application context.
iconKey string The icon key you want this drawable to display.
리턴 android.graphics

actionBarSize() 공개 메소드

Set the size of this icon to the standard Android ActionBar.
public actionBarSize ( ) : IconDrawable
리턴 IconDrawable

alpha() 공개 메소드

Set the alpha of this drawable.
public alpha ( int alpha ) : IconDrawable
alpha int The alpha, between 0 (transparent) and 255 (opaque).
리턴 IconDrawable

clearColorFilter() 공개 메소드

public clearColorFilter ( ) : void
리턴 void

color() 공개 메소드

Set the color of the drawable.
public color ( int color ) : IconDrawable
color int The color, usually from android.graphics.Color or 0xFF012345.
리턴 IconDrawable

colorRes() 공개 메소드

Set the color of the drawable.
public colorRes ( int colorRes ) : IconDrawable
colorRes int The color resource, from your R file.
리턴 IconDrawable

draw() 공개 메소드

public draw ( Canvas canvas ) : void
canvas android.graphics.Canvas
리턴 void

setState() 공개 메소드

public setState ( int stateSet ) : bool
stateSet int
리턴 bool

sizeDp() 공개 메소드

Set the size of the drawable.
public sizeDp ( int size ) : IconDrawable
size int The size in density-independent pixels (dp).
리턴 IconDrawable

sizePx() 공개 메소드

Set the size of the drawable.
public sizePx ( int size ) : IconDrawable
size int The size in pixels (px).
리턴 IconDrawable

sizeRes() 공개 메소드

Set the size of the drawable.
public sizeRes ( int dimenRes ) : IconDrawable
dimenRes int The dimension resource.
리턴 IconDrawable