com.stringsandints.inventium.khlrooster.layout
Class VerticalLabelView

java.lang.Object
  extended by TextView
      extended by com.stringsandints.inventium.khlrooster.layout.VerticalLabelView

public class VerticalLabelView
extends TextView

Author:
kostmo http://stackoverflow.com/questions/1258275/vertical-rotated-label-in-android

Field Summary
(package private) static int DEFAULT_TEXT_SIZE
           
private  int mAscent
           
private  TextPaint mTextPaint
           
private  Rect text_bounds
           
 
Constructor Summary
VerticalLabelView(Context context)
           
VerticalLabelView(Context context, AttributeSet attrs)
           
VerticalLabelView(Context context, int textSize)
           
 
Method Summary
private  void initLabelView()
           
private  int measureHeight(int measureSpec)
           
private  int measureWidth(int measureSpec)
           
protected  void onDraw(Canvas canvas)
           
protected  void onMeasure(int widthMeasureSpec, int heightMeasureSpec)
           
 void setTextColor(int color)
           
 void setTextSize(int size)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTextPaint

private TextPaint mTextPaint

mAscent

private int mAscent

text_bounds

private Rect text_bounds

DEFAULT_TEXT_SIZE

static final int DEFAULT_TEXT_SIZE
See Also:
Constant Field Values
Constructor Detail

VerticalLabelView

public VerticalLabelView(Context context)

VerticalLabelView

public VerticalLabelView(Context context,
                         int textSize)

VerticalLabelView

public VerticalLabelView(Context context,
                         AttributeSet attrs)
Method Detail

initLabelView

private final void initLabelView()

setTextSize

public void setTextSize(int size)

setTextColor

public void setTextColor(int color)

onMeasure

protected void onMeasure(int widthMeasureSpec,
                         int heightMeasureSpec)

measureWidth

private int measureWidth(int measureSpec)

measureHeight

private int measureHeight(int measureSpec)

onDraw

protected void onDraw(Canvas canvas)