|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.view.View
sk.baka.ambient.views.ButtonBar
public final class ButtonBar
A very simple, naive and inefficient implementation of the apple-launchbar-like button bar.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.view.View |
|---|
View.BaseSavedState, View.MeasureSpec, View.OnClickListener, View.OnCreateContextMenuListener, View.OnFocusChangeListener, View.OnKeyListener, View.OnLongClickListener, View.OnTouchListener |
| Field Summary | |
|---|---|
AdapterView.OnItemClickListener |
listener
The ONCLICK listener. |
| Constructor Summary | |
|---|---|
ButtonBar(Context context,
AttributeSet attrs)
|
|
ButtonBar(Context context,
AttributeSet attrs,
int defStyle)
|
|
ButtonBar(Context context,
int rootId,
Integer textHintColor,
Integer textHintBgColor,
Boolean extendDown)
Constructor. |
|
| Method Summary | |
|---|---|
Interval |
getHighlight()
Returns the highlight interval. |
void |
highlight(Interval interval)
Highlights given buttons. |
protected void |
onAttachedToWindow()
|
protected void |
onDetachedFromWindow()
|
protected void |
onDraw(Canvas canvas)
|
protected void |
onFocusChanged(boolean gainFocus,
int direction,
Rect previouslyFocusedRect)
|
boolean |
onKeyDown(int keyCode,
KeyEvent event)
|
boolean |
onKeyUp(int keyCode,
KeyEvent event)
|
protected void |
onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
|
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
|
boolean |
onTouchEvent(MotionEvent event)
|
void |
setBitmaps(int[] bitmapResources,
int[] activityName,
Point bitmapSize,
Point hoveredBitmapSize)
Sets a new set of images to be shown. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public AdapterView.OnItemClickListener listener
| Constructor Detail |
|---|
public ButtonBar(Context context,
int rootId,
Integer textHintColor,
Integer textHintBgColor,
Boolean extendDown)
context - rootId - Denotes root absolute layout id.textHintColor - text hint color, default white.textHintBgColor - text background color, default 50% transparent black.extendDown - If true (the default) then hovered buttons are
extended downwards. If false then buttons are
extended upwards.
public ButtonBar(Context context,
AttributeSet attrs,
int defStyle)
context - attrs - defStyle -
public ButtonBar(Context context,
AttributeSet attrs)
context - attrs - | Method Detail |
|---|
protected void onAttachedToWindow()
onAttachedToWindow in class Viewprotected void onDetachedFromWindow()
onDetachedFromWindow in class View
public void setBitmaps(int[] bitmapResources,
int[] activityName,
Point bitmapSize,
Point hoveredBitmapSize)
bitmapResources - the drawables to showactivityName - the activity captions. If -1 then the caption
is not shown for the item. May be null if no
captions are required to be shown.bitmapSize - the size of all bitmaps. Here the Point class is not
used as a point, it denotes dimension instead.hoveredBitmapSize - the size of hovered bitmap. Here the Point class is
not used as a point, it denotes dimension instead.
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
onMeasure in class ViewView.measure(int, int)protected void onDraw(Canvas canvas)
onDraw in class View
protected void onLayout(boolean changed,
int left,
int top,
int right,
int bottom)
onLayout in class Viewpublic boolean onTouchEvent(MotionEvent event)
onTouchEvent in class View
public boolean onKeyDown(int keyCode,
KeyEvent event)
onKeyDown in interface KeyEvent.CallbackonKeyDown in class View
protected void onFocusChanged(boolean gainFocus,
int direction,
Rect previouslyFocusedRect)
onFocusChanged in class View
public boolean onKeyUp(int keyCode,
KeyEvent event)
onKeyUp in interface KeyEvent.CallbackonKeyUp in class Viewpublic void highlight(Interval interval)
interval - highlighted buttons. May be null - in this case
the interval is empty.public Interval getHighlight()
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||