| AndBase开发框架 1.6

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

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

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

## 类
interface | PopoverViewListener

## Public 成员函数
| AbPopoverView (Context context)
| AbPopoverView (Context context, AttributeSet attrs)
| AbPopoverView (Context context, AttributeSet attrs, int defStyle)
int | getFadeAnimationTime ()
void | setFadeAnimationTime (int fadeAnimationTime)
Point | getContentSizeForViewInPopover ()
void | setContentSizeForViewInPopover (Point contentSizeForViewInPopover)
PopoverViewListener | getPopoverViewListener ()
void | setPopoverViewListener (PopoverViewListener popoverViewListener)
void | showPopoverFromRectInViewGroup (ViewGroup group, Rect originRect, int arrowDirections, boolean animated)
void | dissmissPopover (boolean animated)
boolean | onTouch (View v, MotionEvent event)
Drawable | getBackgroundDrawable ()
void | setBackgroundDrawable (Drawable backgroundDrawable)
Drawable | getArrowUpDrawable ()
void | setArrowUpDrawable (Drawable arrowUpDrawable)
Drawable | getArrowDownDrawable ()
void | setArrowDownDrawable (Drawable arrowDownDrawable)
Drawable | getArrowLeftDrawable ()
void | setArrowLeftDrawable (Drawable arrowLeftDrawable)
Drawable | getArrowRightDrawable ()
void | setArrowRightDrawable (Drawable arrowRightDrawable)
View | getPopoverContentView ()
void | setPopoverContentView (View popoverContentView)

## 静态 Public 成员函数
static Rect | getFrameForView (View v)

## 静态 Public 属性
static final int | PopoverArrowDirectionUp = 0x00000001
static final int | PopoverArrowDirectionDown = 0x00000002
static final int | PopoverArrowDirectionLeft = 0x00000004
static final int | PopoverArrowDirectionRight = 0x00000008
static final int | PopoverArrowDirectionAny = PopoverArrowDirectionUp|PopoverArrowDirectionDown|PopoverArrowDirectionLeft|PopoverArrowDirectionRight

## Private 成员函数
void | initPopoverView ()
void | addPopoverInRect (Rect insertRect)
void | initArrow (Rect originRect, Integer arrowDirection)
Rect | getRectForArrowUp (Rect originRect)
Rect | getRectForArrowDown (Rect originRect)
Rect | getRectForArrowRight (Rect originRect)
Rect | getRectForArrowLeft (Rect originRect)
void | addAvailableRects (Rect originRect, int arrowDirections)
Integer | getBestRect ()

## Private 属性
PopoverViewListener | popoverViewListener
RelativeLayout | popoverView
ViewGroup | superview
Point | contentSizeForViewInPopover = new Point(0, 0)
Point | realContentSize = new Point(0, 0)
Map< Integer, Rect > | possibleRects
boolean | isAnimating = false
int | fadeAnimationTime = 300
Rect | popoverLayoutRect
Drawable | backgroundDrawable
Drawable | arrowUpDrawable
Drawable | arrowDownDrawable
Drawable | arrowLeftDrawable
Drawable | arrowRightDrawable
ImageView | arrowImageView = null
View | popoverContentView = null

## 详细描述

© 2012-2015 amsoft.cn 名称：AbPopoverView.java 描述：提示框

作者
  zhaoqp

版本
  v1.0

日期
  ：2013-11-18 下午5:02:16

## 构造及析构函数说明

com.ab.view.app.AbPopoverView.AbPopoverView | ( | Context | context | ) |
| inline

Constructor to create a popover with a popover view.

参数

  context | The context where we should create the popover view

com.ab.view.app.AbPopoverView.AbPopoverView | ( | Context | context,
|  | AttributeSet | attrs
| ) |  |
| inline

Constructor to create a popover with a popover view.

参数

  context | The context where we should create the popover view
  attrs | Attribute set to init the view

com.ab.view.app.AbPopoverView.AbPopoverView | ( | Context | context,
|  | AttributeSet | attrs,
|  | int | defStyle
| ) |  |
| inline

Constructor to create a popover with a popover view.

参数

  context | The context where we should create the popover view
  attrs | Attribute set to init the view
  defStyle | The default style for this view

## 成员函数说明

void com.ab.view.app.AbPopoverView.addAvailableRects | ( | Rect | originRect,
|  | int | arrowDirections
| ) |  |
| inline private

Add available rects for each selected arrow direction.

参数

  originRect | The rect where the popover will appear from
  arrowDirections | The bit mask for the possible arrow directions

void com.ab.view.app.AbPopoverView.addPopoverInRect | ( | Rect | insertRect | ) |
| inline private

Add the popover to the view with a defined rect inside the popover.

参数

  insertRect | The rect we want to insert the view

void com.ab.view.app.AbPopoverView.dissmissPopover | ( | boolean | animated | ) |
| inline

Dismiss the current shown popover.

参数

  animated | Whether it should be dismissed animated or not

Drawable com.ab.view.app.AbPopoverView.getArrowDownDrawable | ( |  | ) |
| inline

Gets the arrow down drawable.

返回
  the arrow down drawable

Drawable com.ab.view.app.AbPopoverView.getArrowLeftDrawable | ( |  | ) |
| inline

Gets the arrow left drawable.

返回
  the arrow left drawable

Drawable com.ab.view.app.AbPopoverView.getArrowRightDrawable | ( |  | ) |
| inline

Gets the arrow right drawable.

返回
  the arrow right drawable

Drawable com.ab.view.app.AbPopoverView.getArrowUpDrawable | ( |  | ) |
| inline

Gets the arrow up drawable.

返回
  the arrow up drawable

Drawable com.ab.view.app.AbPopoverView.getBackgroundDrawable | ( |  | ) |
| inline

Gets the background drawable.

返回
  the background drawable

Integer com.ab.view.app.AbPopoverView.getBestRect | ( |  | ) |
| inline private

Get the best available rect (bigger area).

返回
  The Integer key to get the Rect from posibleRects (PopoverArrowDirectionUp,PopoverArrowDirectionDown,PopoverArrowDirectionRight or PopoverArrowDirectionLeft)

Point com.ab.view.app.AbPopoverView.getContentSizeForViewInPopover | ( |  | ) |
| inline

Get the content size for view in popover.

返回
  The point with the content size

int com.ab.view.app.AbPopoverView.getFadeAnimationTime | ( |  | ) |
| inline

Gets the current fade animation time.

返回
  The fade animation time, in milliseconds

static Rect com.ab.view.app.AbPopoverView.getFrameForView | ( | View | v | ) |
| inline static

Get the Rect frame for a view (relative to the Window of the application).

参数

  v | The view to get the rect from

返回
  The rect of the view, relative to the application window

View com.ab.view.app.AbPopoverView.getPopoverContentView | ( |  | ) |
| inline

Gets the popover content view.

返回
  the popover content view

PopoverViewListener com.ab.view.app.AbPopoverView.getPopoverViewListener | ( |  | ) |
| inline

Gets the popover view listener.

返回
  the popover view listener

Rect com.ab.view.app.AbPopoverView.getRectForArrowDown | ( | Rect | originRect | ) |
| inline private

Calculates the rect for showing the view with Arrow Down.

参数

  originRect | The origin rect

返回
  The calculated rect to show the view

Rect com.ab.view.app.AbPopoverView.getRectForArrowLeft | ( | Rect | originRect | ) |
| inline private

Calculates the rect for showing the view with Arrow Left.

参数

  originRect | The origin rect

返回
  The calculated rect to show the view

Rect com.ab.view.app.AbPopoverView.getRectForArrowRight | ( | Rect | originRect | ) |
| inline private

Calculates the rect for showing the view with Arrow Right.

参数

  originRect | The origin rect

返回
  The calculated rect to show the view

Rect com.ab.view.app.AbPopoverView.getRectForArrowUp | ( | Rect | originRect | ) |
| inline private

Calculates the rect for showing the view with Arrow Up.

参数

  originRect | The origin rect

返回
  The calculated rect to show the view

void com.ab.view.app.AbPopoverView.initArrow | ( | Rect | originRect,
|  | Integer | arrowDirection
| ) |  |
| inline private

Inits the arrow.

参数

  originRect | the origin rect
  arrowDirection | the arrow direction

void com.ab.view.app.AbPopoverView.initPopoverView | ( |  | ) |
| inline private

Init the popover view.

boolean com.ab.view.app.AbPopoverView.onTouch | ( | View | v,
|  | MotionEvent | event
| ) |  |
| inline

void com.ab.view.app.AbPopoverView.setArrowDownDrawable | ( | Drawable | arrowDownDrawable | ) |
| inline

Sets the arrow down drawable.

参数

  arrowDownDrawable | the new arrow down drawable

void com.ab.view.app.AbPopoverView.setArrowLeftDrawable | ( | Drawable | arrowLeftDrawable | ) |
| inline

Sets the arrow left drawable.

参数

  arrowLeftDrawable | the new arrow left drawable

void com.ab.view.app.AbPopoverView.setArrowRightDrawable | ( | Drawable | arrowRightDrawable | ) |
| inline

Sets the arrow right drawable.

参数

  arrowRightDrawable | the new arrow right drawable

void com.ab.view.app.AbPopoverView.setArrowUpDrawable | ( | Drawable | arrowUpDrawable | ) |
| inline

Sets the arrow up drawable.

参数

  arrowUpDrawable | the new arrow up drawable

void com.ab.view.app.AbPopoverView.setBackgroundDrawable | ( | Drawable | backgroundDrawable | ) |
| inline

void com.ab.view.app.AbPopoverView.setContentSizeForViewInPopover | ( | Point | contentSizeForViewInPopover | ) |
| inline

Sets the content size for the view in a popover, if point is (0,0) the popover will full the screen.

参数

  contentSizeForViewInPopover | the new content size for view in popover

void com.ab.view.app.AbPopoverView.setFadeAnimationTime | ( | int | fadeAnimationTime | ) |
| inline

Sets the fade animation time.

参数

  fadeAnimationTime | The time in milliseconds

void com.ab.view.app.AbPopoverView.setPopoverContentView | ( | View | popoverContentView | ) |
| inline

描述：设置显示的View.

参数

  popoverContentView | the new popover content view

void com.ab.view.app.AbPopoverView.setPopoverViewListener | ( | PopoverViewListener | popoverViewListener | ) |
| inline

Sets the popover view listener.

参数

  popoverViewListener | the new popover view listener

void com.ab.view.app.AbPopoverView.showPopoverFromRectInViewGroup | ( | ViewGroup | group,
|  | Rect | originRect,
|  | int | arrowDirections,
|  | boolean | animated
| ) |  |
| inline

This method shows a popover in a ViewGroup, from an origin rect (relative to the Application Window).

参数

  group | The group we want to insert the popup. Normally a Relative Layout so it can stand on top of everything
  originRect | The rect we want the popup to appear from (relative to the Application Window!)
  arrowDirections | The mask of bits to tell in which directions we want the popover to be shown
  animated | Whether is animated, or not

## 类成员变量说明

Drawable com.ab.view.app.AbPopoverView.arrowDownDrawable
| private

The popover arrow down drawable.

ImageView com.ab.view.app.AbPopoverView.arrowImageView = null
| private

当前显示的箭头图标.

Drawable com.ab.view.app.AbPopoverView.arrowLeftDrawable
| private

The popover arrow left drawable.

Drawable com.ab.view.app.AbPopoverView.arrowRightDrawable
| private

The popover arrow down drawable.

Drawable com.ab.view.app.AbPopoverView.arrowUpDrawable
| private

The popover arrow up drawable.

Drawable com.ab.view.app.AbPopoverView.backgroundDrawable
| private

The popover background drawable.

Point com.ab.view.app.AbPopoverView.contentSizeForViewInPopover = new Point(0, 0)
| private

The content size for the view in the popover.

int com.ab.view.app.AbPopoverView.fadeAnimationTime = 300
| private

The fade animation time in milliseconds.

boolean com.ab.view.app.AbPopoverView.isAnimating = false
| private

Whether the view is animating or not.

final int com.ab.view.app.AbPopoverView.PopoverArrowDirectionAny = PopoverArrowDirectionUp|PopoverArrowDirectionDown|PopoverArrowDirectionLeft|PopoverArrowDirectionRight
| static

Popover arrow points any direction. Integer to use with bit operators to tell the popover where the arrow should appear and from where the popover should appear

final int com.ab.view.app.AbPopoverView.PopoverArrowDirectionDown = 0x00000002
| static

Popover arrow points down. Integer to use with bit operators to tell the popover where the arrow should appear and from where the popover should appear

final int com.ab.view.app.AbPopoverView.PopoverArrowDirectionLeft = 0x00000004
| static

Popover arrow points left. Integer to use with bit operators to tell the popover where the arrow should appear and from where the popover should appear

final int com.ab.view.app.AbPopoverView.PopoverArrowDirectionRight = 0x00000008
| static

Popover arrow points right. Integer to use with bit operators to tell the popover where the arrow should appear and from where the popover should appear

final int com.ab.view.app.AbPopoverView.PopoverArrowDirectionUp = 0x00000001
| static

Popover arrow points up. Integer to use with bit operators to tell the popover where the arrow should appear and from where the popover should appear

View com.ab.view.app.AbPopoverView.popoverContentView = null
| private

当前显示的提示的View.

Rect com.ab.view.app.AbPopoverView.popoverLayoutRect
| private

The layout Rect, is the same as the superview rect.

RelativeLayout com.ab.view.app.AbPopoverView.popoverView
| private

The main popover containing the view we want to show.

PopoverViewListener com.ab.view.app.AbPopoverView.popoverViewListener
| private

The delegate of the view.

Map<Integer, Rect> com.ab.view.app.AbPopoverView.possibleRects
| private

A hash containing.

Point com.ab.view.app.AbPopoverView.realContentSize = new Point(0, 0)
| private

The real content size we will use (it considers the padding).

ViewGroup com.ab.view.app.AbPopoverView.superview
| private

The view group storing this popover. We need this so, when we dismiss the popover, we remove it from the view group

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

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