| AndBase开发框架 1.6

- 首页
- 相关页面
- 命名空间
- 类
- 文件

- 类列表
- 类索引
- 类继承关系
- 类成员

全部 类 命名空间 文件 函数 变量 枚举值 页
Public 成员函数 | Protected 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
com.ab.view.app.AbAnalogClock类 参考
类 com.ab.view.app.AbAnalogClock 继承关系图:

## Public 成员函数
| AbAnalogClock (Context context, Drawable dial, Drawable hourHand, Drawable minuteHand, Drawable secondHand)

## Protected 成员函数
void | onAttachedToWindow ()
void | onDetachedFromWindow ()
void | onMeasure (int widthMeasureSpec, int heightMeasureSpec)
void | onSizeChanged (int w, int h, int oldw, int oldh)
void | onDraw (Canvas canvas)

## Private 成员函数
void | onTimeChanged ()
void | updateContentDescription (Time time)

## Private 属性
Time | mCalendar
Drawable | mHourHand
Drawable | mMinuteHand
Drawable | mSecondHand
Drawable | mDial
int | mDialWidth
int | mDialHeight
boolean | mAttached
float | mMinutes
float | mHour
float | mSecond
final Handler | mHandler = new Handler()
boolean | mChanged
final BroadcastReceiver | mIntentReceiver

## 详细描述

© 2012 amsoft.cn 名称：AbAnalogClock.java 描述：自定义模拟时钟

作者
  还如一梦中

版本
  v1.0

日期
  ：2013-11-6 上午9:13:49

## 构造及析构函数说明

com.ab.view.app.AbAnalogClock.AbAnalogClock | ( | Context | context,
|  | Drawable | dial,
|  | Drawable | hourHand,
|  | Drawable | minuteHand,
|  | Drawable | secondHand
| ) |  |
| inline

Instantiates a new ab analog clock.

参数

  context | the context
  dial | the dial
  hourHand | the hour hand
  minuteHand | the minute hand
  secondHand | the second hand

## 成员函数说明

void com.ab.view.app.AbAnalogClock.onAttachedToWindow | ( |  | ) |
| inline protected

void com.ab.view.app.AbAnalogClock.onDetachedFromWindow | ( |  | ) |
| inline protected

void com.ab.view.app.AbAnalogClock.onDraw | ( | Canvas | canvas | ) |
| inline protected

void com.ab.view.app.AbAnalogClock.onMeasure | ( | int | widthMeasureSpec,
|  | int | heightMeasureSpec
| ) |  |
| inline protected

void com.ab.view.app.AbAnalogClock.onSizeChanged | ( | int | w,
|  | int | h,
|  | int | oldw,
|  | int | oldh
| ) |  |
| inline protected

void com.ab.view.app.AbAnalogClock.onTimeChanged | ( |  | ) |
| inline private

On time changed.

void com.ab.view.app.AbAnalogClock.updateContentDescription | ( | Time | time | ) |
| inline private

Update content description.

参数

  time | the time

## 类成员变量说明

boolean com.ab.view.app.AbAnalogClock.mAttached
| private

The m attached.

Time com.ab.view.app.AbAnalogClock.mCalendar
| private

The m calendar.

boolean com.ab.view.app.AbAnalogClock.mChanged
| private

The m changed.

Drawable com.ab.view.app.AbAnalogClock.mDial
| private

The m dial.

int com.ab.view.app.AbAnalogClock.mDialHeight
| private

The m dial height.

int com.ab.view.app.AbAnalogClock.mDialWidth
| private

The m dial width.

final Handler com.ab.view.app.AbAnalogClock.mHandler = new Handler()
| private

The m handler.

float com.ab.view.app.AbAnalogClock.mHour
| private

The m hour.

Drawable com.ab.view.app.AbAnalogClock.mHourHand
| private

The m hour hand.

final BroadcastReceiver com.ab.view.app.AbAnalogClock.mIntentReceiver
| private

初始值:
= new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_TIMEZONE_CHANGED)) {
String tz = intent.getStringExtra("time-zone");
mCalendar = new Time(TimeZone.getTimeZone(tz).getID());
}
}
}

The m intent receiver.

Drawable com.ab.view.app.AbAnalogClock.mMinuteHand
| private

The m minute hand.

float com.ab.view.app.AbAnalogClock.mMinutes
| private

The m minutes.

float com.ab.view.app.AbAnalogClock.mSecond
| private

The m second.

Drawable com.ab.view.app.AbAnalogClock.mSecondHand
| private

The m second hand.

该类的文档由以下文件生成:

- src/com/ab/view/app/AbAnalogClock.java