com.supermap.mapping.dyn
类 DynamicView
- java.lang.Object
-
- android.view.View
-
- com.supermap.mapping.dyn.DynamicView
-
- 所有已实现的接口:
- android.graphics.drawable.Drawable.Callback, android.view.accessibility.AccessibilityEventSource, android.view.KeyEvent.Callback
public class DynamicView extends android.view.View
动态层控件。
-
-
嵌套类概要
-
从类继承的嵌套类/接口 android.view.View
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
-
-
字段概要
-
从类继承的字段 android.view.View
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, VISIBLE, X, Y
-
-
构造器概要
构造器 构造器和说明 DynamicView(android.content.Context context, Map map)
动态层构造函数。
-
方法概要
所有方法 实例方法 具体方法 限定符和类型 方法和说明 void
addElement(DynamicElement element)
添加动态对象。void
clear()
清空动态对象。void
continuAnimation()
继续动画(所有元素)void
dispose()
释放资源android.view.GestureDetector
getGestureDetector()
获取当前用户自定义的操作手势识别器。float
GetHitTestTolerance()
获取动态对象选择的容限值。int
getIndex()
获取当前动态层的索引。int
getViewAlpha()
返回动态层对象透明度。boolean
isAllNamesVisible()
获取是否显示所有对象的名称。boolean
isAutoSort()
是否排序显示boolean
isCacheEnabled()
返回缓存模式是否启用boolean
isElementAvoid()
是否开启避让效果boolean
isPolymerize()
获取是否开启聚合功能。boolean
isVisible()
返回动态层是否可见boolean
moveBottom()
将动态层移至最下层显示boolean
moveDown()
将动态层下移一层显示boolean
moveTo(int index)
将动态层移动到指定索引位置。boolean
moveTop()
将动态层移至最上层显示boolean
moveUp()
将动态层上移一层显示void
pauseAnimation()
暂停动画(所有元素)DynamicElement
query(int id)
通过ID获取指定ID的动态数据。java.util.List<DynamicElement>
query(int[] ids)
通过ID数组查询四叉树中的数据。java.util.List<DynamicElement>
query(Rectangle2D bounds)
通过范围查询四叉树中的数据。java.util.List<DynamicElement>
queryByTag(java.lang.String tag)
根据标签查询动态对象,并返回包含相同标签的动态对象列表。void
refresh()
刷新动态层。int
removeByTag(java.lang.String tag)
根据标签移除动态对象,并返回移除对象的数目。boolean
removeElement(DynamicElement element)
移除动态对象。boolean
removeElement(int id)
移除动态对象。Bitmap
screenShot()
void
setAllNamesVisible(boolean visible)
设置是否显示所有动态对象的名称。void
setAutoSort(boolean enable)
允许动态层对象按从小到大的顺序排序显示void
setCacheEnabled(boolean enabled)
设置缓存模式是否启用,提升在大数据下动态层显示效率(注:Android 8.0由于安卓系统某个API性能急剧下降,需要设置为false)void
setElementAvoid(boolean mIsElementAvoid)
开启避让void
setGestureDetector(android.view.GestureDetector gsDetector)
设置用户手势识别器。void
setHitTestTolerance(float tolerance)
设置动态对象选择的容限值。void
setPolymerize(boolean value)
设置是否开启聚合功能。void
setViewAlpha(int value)
设置动态层对象透明度,0~255有效。void
setVisible(boolean value)
设置动态层是否可见void
startAnimation()
开始动画。void
stopAnimation()
停止动画(所有元素)-
从类继承的方法 android.view.View
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeScroll, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewsWithText, findViewWithTag, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getCameraDistance, getClipBounds, getContentDescription, getContext, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, isActivated, isAttachedToWindow, isClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onCreateInputConnection, onDragEvent, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPopulateAccessibilityEvent, onRtlPropertiesChanged, onScreenStateChanged, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBottom, setCameraDistance, setClickable, setClipBounds, setContentDescription, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTranslationX, setTranslationY, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, showContextMenu, startActionMode, startAnimation, startDrag, toString, unscheduleDrawable, unscheduleDrawable, willNotCacheDrawing, willNotDraw
-
-
-
-
构造器详细资料
-
DynamicView
public DynamicView(android.content.Context context, Map map)
动态层构造函数。- 参数:
context
- android上下文环境。map
- 地图。
-
-
方法详细资料
-
addElement
public void addElement(DynamicElement element)
添加动态对象。- 参数:
element
- 动态对象。
-
clear
public void clear()
清空动态对象。
-
query
public java.util.List<DynamicElement> query(Rectangle2D bounds)
通过范围查询四叉树中的数据。- 参数:
bounds
- 查询范围。- 返回:
- 查询结果。
-
removeElement
public boolean removeElement(DynamicElement element)
移除动态对象。- 参数:
element
- 动态对象。- 返回:
- 布尔值,移除成功则返回true;否则返回false。
-
removeElement
public boolean removeElement(int id)
移除动态对象。- 参数:
id
- 动态对象ID。- 返回:
- 布尔值,移除成功则返回true;否则返回false。
-
query
public java.util.List<DynamicElement> query(int[] ids)
通过ID数组查询四叉树中的数据。- 参数:
ids
- ID数组。- 返回:
- 查询结果。
-
query
public DynamicElement query(int id)
通过ID获取指定ID的动态数据。- 参数:
id
- 对象ID。- 返回:
- 查询结果。
-
getGestureDetector
public android.view.GestureDetector getGestureDetector()
获取当前用户自定义的操作手势识别器。- 返回:
- 用户当前的操作手势。
-
setGestureDetector
public void setGestureDetector(android.view.GestureDetector gsDetector)
设置用户手势识别器。- 参数:
gsDetector
- the listener invoked for all the callbacks, this must not be null。
-
setHitTestTolerance
public void setHitTestTolerance(float tolerance)
设置动态对象选择的容限值。- 参数:
tolerance
- 动态对象选择的容限值。
-
GetHitTestTolerance
public float GetHitTestTolerance()
获取动态对象选择的容限值。- 返回:
- 动态对象选择的容限值。
-
isPolymerize
public boolean isPolymerize()
获取是否开启聚合功能。- 返回:
- 布尔值,开启聚合功能则返回true;否则返回false。
-
setPolymerize
public void setPolymerize(boolean value)
设置是否开启聚合功能。- 参数:
value
- 指定是否开启聚合功能。
-
refresh
public void refresh()
刷新动态层。
-
startAnimation
public void startAnimation()
开始动画。
-
pauseAnimation
public void pauseAnimation()
暂停动画(所有元素)
-
continuAnimation
public void continuAnimation()
继续动画(所有元素)
-
stopAnimation
public void stopAnimation()
停止动画(所有元素)
-
setCacheEnabled
public void setCacheEnabled(boolean enabled)
设置缓存模式是否启用,提升在大数据下动态层显示效率(注:Android 8.0由于安卓系统某个API性能急剧下降,需要设置为false)- 参数:
enabled
- 是否启用缓存模式
-
isCacheEnabled
public boolean isCacheEnabled()
返回缓存模式是否启用- 返回:
- boolean 是否启用缓存模式
-
setAutoSort
public void setAutoSort(boolean enable)
允许动态层对象按从小到大的顺序排序显示- 参数:
enable
- 是否排序,true为排序,false为不排序。
-
isAutoSort
public boolean isAutoSort()
是否排序显示- 返回:
- 是否排序显示,true为排序显示,false为不排序显示。
-
moveUp
public boolean moveUp()
将动态层上移一层显示- 返回:
- 是否移动成功,成功返回true,失败返回false。
-
moveDown
public boolean moveDown()
将动态层下移一层显示- 返回:
- 是否移动成功,成功返回true,失败返回false。
-
moveTop
public boolean moveTop()
将动态层移至最上层显示- 返回:
- 是否移动成功,成功返回true,失败返回false。
-
moveBottom
public boolean moveBottom()
将动态层移至最下层显示- 返回:
- 是否移动成功,成功返回true,失败返回false。
-
setVisible
public void setVisible(boolean value)
设置动态层是否可见- 参数:
value
- 一个布尔值,true表示设置动态层可见,false表示设置动态层不可见
-
isVisible
public boolean isVisible()
返回动态层是否可见- 返回:
- boolean 返回一个布尔值,true表示动态层可见,false表示动态层不可见
-
queryByTag
public java.util.List<DynamicElement> queryByTag(java.lang.String tag)
根据标签查询动态对象,并返回包含相同标签的动态对象列表。- 参数:
tag
- 标签,字符串类型。- 返回:
- 返回包含相同标签的动态对象列表。
-
removeByTag
public int removeByTag(java.lang.String tag)
根据标签移除动态对象,并返回移除对象的数目。- 参数:
tag
- 标签字符串。- 返回:
- 返回被移除对象的数目。
-
moveTo
public boolean moveTo(int index)
将动态层移动到指定索引位置。- 参数:
index
- 指定索引位置。- 返回:
- 返回一个布尔值,true表示移动成功,false表示移动失败。
-
getIndex
public int getIndex()
获取当前动态层的索引。- 返回:
- 当前动态层的索引。
-
setViewAlpha
public void setViewAlpha(int value)
设置动态层对象透明度,0~255有效。- 参数:
value
- 对象透明度。
-
getViewAlpha
public int getViewAlpha()
返回动态层对象透明度。- 返回:
- boolean 一个布尔值,true表示对象透明,false表示对象不透明。
-
setAllNamesVisible
public void setAllNamesVisible(boolean visible)
设置是否显示所有动态对象的名称。- 参数:
visible
- 动态对象的名称是否可见,默认为false,根据对象自身属性显示,否则全部显示。
-
isAllNamesVisible
public boolean isAllNamesVisible()
获取是否显示所有对象的名称。- 返回:
- 返回是否显示所有对象的名称,是,则返回true,否则返回false。
-
dispose
public void dispose()
释放资源
-
isElementAvoid
public boolean isElementAvoid()
是否开启避让效果- 返回:
- false
-
setElementAvoid
public void setElementAvoid(boolean mIsElementAvoid)
开启避让- 参数:
mIsElementAvoid
-
-
screenShot
public Bitmap screenShot()
-
-