public class SpreadsheetView
extends android.view.View
implements android.view.GestureDetector.OnGestureListener
Modifier and Type | Class and Description |
---|---|
static interface |
SpreadsheetView.OnCellClickListener |
static interface |
SpreadsheetView.OnFooterChangedListener |
static interface |
SpreadsheetView.OnFooterClickListener |
static interface |
SpreadsheetView.OnHeaderClickListener |
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, 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
Modifier and Type | Field and Description |
---|---|
protected String[] |
footers |
protected String[] |
headers |
protected SpreadsheetRow[] |
objectData |
protected int[] |
sorted |
static int |
SORTED_ASCENDING |
static int |
SORTED_DESCENDING |
static int |
SORTED_UNSORTED |
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, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, 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, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, 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, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, 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, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, 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, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y
Constructor and Description |
---|
SpreadsheetView(android.content.Context context) |
SpreadsheetView(android.content.Context context,
android.util.AttributeSet attrs) |
SpreadsheetView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
Modifier and Type | Method and Description |
---|---|
protected void |
drawStickyColumn(android.graphics.Canvas canvas) |
protected void |
drawStickyFooter(android.graphics.Canvas canvas) |
protected void |
drawStickyHeader(android.graphics.Canvas canvas) |
String |
getDataAt(int objectIndex,
int valueIndex)
Returns string data from given cell.
|
SpreadsheetCell |
getDataCell() |
float |
getDataCellHeight() |
int |
getDataCellTextColor() |
float |
getDataCellTextSize() |
android.graphics.Typeface |
getDataCellTypeface() |
float |
getDataCellWidth() |
String |
getFooterAt(int valueIndex)
Returns footer value at the given index.
|
String |
getHeaderAt(int valueIndex)
Returns header value at the given index.
|
android.graphics.Paint |
getHorizontalDividingPaint() |
SpreadsheetCell |
getLeftFootCornerCell() |
int |
getLeftFootCornerCellTextColor() |
android.graphics.Typeface |
getLeftFootCornerCellTypeface() |
SpreadsheetCell |
getLeftHeadCornerCell() |
int |
getLeftHeadCornerCellTextColor() |
android.graphics.Typeface |
getLeftHeadCornerCellTypeface() |
int |
getNumberNonStickyColumns() |
int |
getNumberObjects()
Returns total number of rows in spreadsheet.
|
int |
getNumberStickyColumns() |
SpreadsheetRow |
getRowAt(int objectIndex)
returns SpreadsheetRow object representing specified row of spreadsheet.
|
int |
getSortedStatus(int valueIndex) |
SpreadsheetCell |
getStickyColumnCell() |
int |
getStickyColumnCellTextColor() |
android.graphics.Typeface |
getStickyColumnCellTypeface() |
float |
getStickyColumnTextSize() |
float |
getStickyColumnWidth(int columnIndex) |
SpreadsheetCell |
getStickyFooterCell() |
int |
getStickyFooterCellTextColor() |
float |
getStickyFooterHeight() |
float |
getStickyFooterTextSize() |
SpreadsheetCell |
getStickyHeaderCell() |
int |
getStickyHeaderCellTextColor() |
android.graphics.Typeface |
getStickyHeaderCellTypeface() |
float |
getStickyHeaderHeight() |
float |
getStickyHeaderTextSize() |
float |
getStickyTableHeight() |
float |
getStickyTableWidth() |
int |
getTotalNumberColumns() |
float |
getTotalStickyColumnsWidth() |
android.graphics.Paint |
getVerticalDividingPaint() |
void |
hideStickyFooter() |
void |
incStickyColumnWidth(int columnIndex,
float dw) |
void |
incStickyFooterHeight(float dh) |
void |
incStickyHeaderHeight(float dh) |
boolean |
isFooterSelected(int valueIndex) |
boolean |
isHeaderSelected(int valueIndex) |
boolean |
isSelected(int objectIndex,
int valueIndex) |
boolean |
onDown(android.view.MotionEvent e) |
protected void |
onDraw(android.graphics.Canvas canvas) |
boolean |
onFling(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float velocityX,
float velocityY) |
void |
onLongPress(android.view.MotionEvent e) |
boolean |
onScroll(android.view.MotionEvent e1,
android.view.MotionEvent e2,
float distanceX,
float distanceY) |
void |
onShowPress(android.view.MotionEvent e) |
boolean |
onSingleTapUp(android.view.MotionEvent e) |
protected void |
onSizeChanged(int width,
int height,
int oldwidth,
int oldheight)
Adjust dimensions of different portions of spreadsheet to new size of SpreadsheetView.
|
boolean |
onTouchEvent(android.view.MotionEvent event)
Send events to gestureDetector.
|
void |
scroll(float x,
float y) |
void |
select(int objectIndex,
int valueIndex,
boolean select) |
void |
selectColumn(int valueIndex,
boolean select) |
void |
selectFooter(int valueIndex,
boolean select) |
void |
selectHeader(int valueIndex,
boolean select) |
void |
selectRow(int objectIndex,
boolean select) |
void |
setAllCellsBorderWidth(float horizontalWidth,
float verticalWidth)
Set a border width to every cell.
|
void |
setAllCellsSelectedTextColor(int color)
Set a color to the selected text of every cell
|
void |
setAllCellsTextColor(int color)
Set a color to the text of every cell
|
void |
setAllCellsTextSize(float textSize)
Sets the text size of all text in every cell
|
void |
setAllCellsTypeface(android.graphics.Typeface typeface)
Set a custom typeface to every cell
|
void |
setData(SpreadsheetRow[] data,
String[] headers)
Set all data and headers for spreadsheet.
|
void |
setDataAt(int objectIndex,
int valueIndex,
String data)
Set data for a single cell.
|
void |
setDataCell(SpreadsheetCell cell) |
void |
setDataCellDimensions(float width,
float height)
Set height and width for our data cells
|
void |
setDataCellTextColor(int color) |
void |
setDataCellTextSize(float size)
Set text size in a data cell
|
void |
setDataCellTypeface(android.graphics.Typeface typeface) |
void |
setFooterChangedListener(SpreadsheetView.OnFooterChangedListener listener) |
void |
setFooters(String[] footers,
float height)
Set data to all footers as well as height of footers.
|
void |
setHorizontalDividingPaint(android.graphics.Paint paint) |
void |
setLeftFootCornerCell(SpreadsheetCell cell) |
void |
setLeftFootCornerCellTextColor(int color) |
void |
setLeftFootCornerCellTypeface(android.graphics.Typeface typeface) |
void |
setLeftHeadCornerCell(SpreadsheetCell cell) |
void |
setLeftHeadCornerCellTextColor(int color) |
void |
setLeftHeadCornerCellTypeface(android.graphics.Typeface typeface) |
void |
setNumberStickyColumns(int number)
Set the number of sticky columns for your spreadsheet
|
void |
setOnCellClickListener(SpreadsheetView.OnCellClickListener listener) |
void |
setOnFooterClickListener(SpreadsheetView.OnFooterClickListener listener) |
void |
setOnHeaderClickListener(SpreadsheetView.OnHeaderClickListener listener) |
void |
setRow(int objectIndex,
SpreadsheetRow row)
Set data to entire row using SpreadsheetRow object
|
void |
setRow(int objectIndex,
String[] row)
Set data to entire row using strings.
|
void |
setStickyColumnCell(SpreadsheetCell cell) |
void |
setStickyColumnCellTextColor(int color) |
void |
setStickyColumnCellTypeface(android.graphics.Typeface typeface) |
void |
setStickyColumnTextSize(float size)
Set the text size for the sticky columns
|
void |
setStickyColumnWidth(int columnIndex,
float width)
Allows you to set the width of a stick column
|
void |
setStickyFooterCell(SpreadsheetCell cell) |
void |
setStickyFooterCellTextColor(int color) |
void |
setStickyFooterCellTypeface(android.graphics.Typeface typeface) |
void |
setStickyFooterHeight(float height)
Set height for the sticky footer
|
void |
setStickyFooterTextSize(float size)
Set the text size in a sticky footer
|
void |
setStickyHeaderCell(SpreadsheetCell cell) |
void |
setStickyHeaderCellTextColor(int color) |
void |
setStickyHeaderCellTypeface(android.graphics.Typeface typeface) |
void |
setStickyHeaderHeight(float height)
Set the height for a sticky header
|
void |
setStickyHeaderTextSize(float size)
Set the text size for the sticky header
|
void |
setValuesColumn(int headerIndex,
String[] column)
Sets data to entire column.
|
void |
setVerticalDividingPaint(android.graphics.Paint paint) |
void |
showStickyFooter(float height) |
void |
sortDataAscBy(int valueIndex,
Comparator<SpreadsheetRow> comparator)
Sort column at given index ascending using the given comparator.
|
void |
sortDataDescBy(int valueIndex,
Comparator<SpreadsheetRow> comparator)
Sort column at given index descending using the given comparator.
|
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, 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, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollX, getScrollY, getSolidColor, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTranslationX, getTranslationY, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, hasFocus, hasFocusable, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, initializeFadingEdge, initializeScrollbars, 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, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onAttachedToWindow, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onOverScrolled, onPopulateAccessibilityEvent, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, 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, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, 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, verifyDrawable, willNotCacheDrawing, willNotDraw
protected SpreadsheetRow[] objectData
protected String[] headers
protected int[] sorted
public static final int SORTED_UNSORTED
public static final int SORTED_ASCENDING
public static final int SORTED_DESCENDING
protected String[] footers
public SpreadsheetView(android.content.Context context)
public SpreadsheetView(android.content.Context context, android.util.AttributeSet attrs)
public SpreadsheetView(android.content.Context context, android.util.AttributeSet attrs, int defStyleAttr)
protected void onSizeChanged(int width, int height, int oldwidth, int oldheight)
onSizeChanged
in class android.view.View
public boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent
in class android.view.View
public void setFooterChangedListener(SpreadsheetView.OnFooterChangedListener listener)
public void setOnHeaderClickListener(SpreadsheetView.OnHeaderClickListener listener)
public void setOnFooterClickListener(SpreadsheetView.OnFooterClickListener listener)
public void setOnCellClickListener(SpreadsheetView.OnCellClickListener listener)
public void sortDataAscBy(int valueIndex, Comparator<SpreadsheetRow> comparator)
valueIndex
- index of column to be sortedcomparator
- comparator that determines how to sortpublic void sortDataDescBy(int valueIndex, Comparator<SpreadsheetRow> comparator)
valueIndex
- index of column to be sortedcomparator
- comparator that determines how to sortpublic void setData(SpreadsheetRow[] data, String[] headers)
data
- array containing SpreadsheetRows for each objectheaders
- array containing titles of columnspublic void setDataAt(int objectIndex, int valueIndex, String data)
objectIndex
- index of rowvalueIndex
- index of columndata
- data to put in cellpublic String getDataAt(int objectIndex, int valueIndex)
objectIndex
- index of rowvalueIndex
- index of columnpublic void setValuesColumn(int headerIndex, String[] column)
headerIndex
- index to insert columncolumn
- values for columnpublic void setFooters(String[] footers, float height)
footers
- values to set as footersheight
- height of footer rowpublic void setRow(int objectIndex, String[] row)
objectIndex
- row index to setrow
- string data to be setpublic void setRow(int objectIndex, SpreadsheetRow row)
objectIndex
- row index to setrow
- SpreadsheetRow object to setpublic SpreadsheetRow getRowAt(int objectIndex)
objectIndex
- row index to returnpublic String getFooterAt(int valueIndex)
valueIndex
- index of footerpublic String getHeaderAt(int valueIndex)
valueIndex
- index of header.public int getNumberObjects()
public void scroll(float x, float y)
public void selectRow(int objectIndex, boolean select)
public void selectColumn(int valueIndex, boolean select)
public void select(int objectIndex, int valueIndex, boolean select)
public void selectFooter(int valueIndex, boolean select)
public void selectHeader(int valueIndex, boolean select)
public boolean isFooterSelected(int valueIndex)
public boolean isHeaderSelected(int valueIndex)
public boolean isSelected(int objectIndex, int valueIndex)
protected void onDraw(android.graphics.Canvas canvas)
onDraw
in class android.view.View
protected void drawStickyColumn(android.graphics.Canvas canvas)
protected void drawStickyHeader(android.graphics.Canvas canvas)
protected void drawStickyFooter(android.graphics.Canvas canvas)
public float getStickyTableWidth()
public float getStickyTableHeight()
public boolean onDown(android.view.MotionEvent e)
onDown
in interface android.view.GestureDetector.OnGestureListener
public void onShowPress(android.view.MotionEvent e)
onShowPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onSingleTapUp(android.view.MotionEvent e)
onSingleTapUp
in interface android.view.GestureDetector.OnGestureListener
public boolean onScroll(android.view.MotionEvent e1, android.view.MotionEvent e2, float distanceX, float distanceY)
onScroll
in interface android.view.GestureDetector.OnGestureListener
public void onLongPress(android.view.MotionEvent e)
onLongPress
in interface android.view.GestureDetector.OnGestureListener
public boolean onFling(android.view.MotionEvent e1, android.view.MotionEvent e2, float velocityX, float velocityY)
onFling
in interface android.view.GestureDetector.OnGestureListener
public int getTotalNumberColumns()
public int getNumberNonStickyColumns()
public float getTotalStickyColumnsWidth()
public void setStickyColumnWidth(int columnIndex, float width)
columnIndex
- set which column to adjustwidth
- set the width of the columnpublic float getStickyColumnWidth(int columnIndex)
public void setNumberStickyColumns(int number)
number
- number of columnspublic int getNumberStickyColumns()
public void incStickyColumnWidth(int columnIndex, float dw)
public void setStickyHeaderTextSize(float size)
size
- size of textpublic float getStickyHeaderTextSize()
public void setStickyFooterTextSize(float size)
size
- size of textpublic float getStickyFooterTextSize()
public void setStickyColumnTextSize(float size)
size
- size of textpublic float getStickyColumnTextSize()
public void setDataCellTextSize(float size)
size
- size of textpublic float getDataCellTextSize()
public void incStickyHeaderHeight(float dh)
public void setStickyHeaderHeight(float height)
height
- height of headerpublic float getStickyHeaderHeight()
public void hideStickyFooter()
public void showStickyFooter(float height)
public void setStickyFooterHeight(float height)
height
- height of headerpublic float getStickyFooterHeight()
public void incStickyFooterHeight(float dh)
public void setDataCellDimensions(float width, float height)
width
- set the width of the cellheight
- height of cellpublic float getDataCellWidth()
public float getDataCellHeight()
public void setAllCellsTextSize(float textSize)
textSize
- size of textpublic void setAllCellsBorderWidth(float horizontalWidth, float verticalWidth)
horizontalWidth
- horizontal widthverticalWidth
- horizontal widthpublic void setAllCellsTextColor(int color)
color
- color of textpublic void setAllCellsSelectedTextColor(int color)
color
- color of textpublic void setAllCellsTypeface(android.graphics.Typeface typeface)
typeface
- typeface for textpublic void setLeftFootCornerCell(SpreadsheetCell cell)
public SpreadsheetCell getLeftFootCornerCell()
public void setLeftFootCornerCellTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getLeftFootCornerCellTypeface()
public void setLeftFootCornerCellTextColor(int color)
public int getLeftFootCornerCellTextColor()
public void setLeftHeadCornerCell(SpreadsheetCell cell)
public SpreadsheetCell getLeftHeadCornerCell()
public void setLeftHeadCornerCellTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getLeftHeadCornerCellTypeface()
public void setLeftHeadCornerCellTextColor(int color)
public int getLeftHeadCornerCellTextColor()
public void setDataCell(SpreadsheetCell cell)
public SpreadsheetCell getDataCell()
public void setDataCellTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getDataCellTypeface()
public void setDataCellTextColor(int color)
public int getDataCellTextColor()
public void setStickyColumnCell(SpreadsheetCell cell)
public SpreadsheetCell getStickyColumnCell()
public void setStickyColumnCellTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getStickyColumnCellTypeface()
public void setStickyColumnCellTextColor(int color)
public int getStickyColumnCellTextColor()
public void setStickyHeaderCell(SpreadsheetCell cell)
public SpreadsheetCell getStickyHeaderCell()
public void setStickyHeaderCellTypeface(android.graphics.Typeface typeface)
public android.graphics.Typeface getStickyHeaderCellTypeface()
public void setStickyHeaderCellTextColor(int color)
public int getStickyHeaderCellTextColor()
public void setStickyFooterCell(SpreadsheetCell cell)
public SpreadsheetCell getStickyFooterCell()
public void setStickyFooterCellTypeface(android.graphics.Typeface typeface)
public void setStickyFooterCellTextColor(int color)
public int getStickyFooterCellTextColor()
public void setHorizontalDividingPaint(android.graphics.Paint paint)
public android.graphics.Paint getHorizontalDividingPaint()
public void setVerticalDividingPaint(android.graphics.Paint paint)
public android.graphics.Paint getVerticalDividingPaint()
public int getSortedStatus(int valueIndex)
Copyright © 2011–2014. All rights reserved.