Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/opendatakit/tables i…
Browse files Browse the repository at this point in the history
…nto xupdate
  • Loading branch information
wbrunette committed Jun 1, 2019
2 parents a216045 + b31cc59 commit b100d6f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,23 +637,22 @@ public void onDraw(Canvas canvas) {
|| this.type == TableLayoutType.MAIN_DATA) {
// these are the only cases (below) where this value is used...
theRow = mTable.getRowAtIndex(theRowIndex);
if (theRow == null) {
// TODO don't know what else to do here, this happens with the really odd
// IndexOutOfBoundsException
String appName = null;
if (controller.getContext() instanceof IAppAwareActivity) {
appName = ((IAppAwareActivity) controller.getContext()).getAppName();

// theRow is a wrapper of the row. Therefore, theRow should
// be null whenever an index that is out of bounds of the given
// table will also return null. If this is the case, this loop
// should break to stop drawing.
if (theRow != null) {
String checkNull = theRow.getStringValueByKey(DataTableColumns.ID);
if (checkNull != null) {
rowGuide = mRowColorGuideGroup.getColorGuideForRowId(checkNull);
}
WebLogger.getLogger(appName).e(TAG, "Out of bounds exception bug AGAIN");
return;
} else {
break;
}
//rowGuide = mRowColorRuleGroup.getColorGuide(this.mTable.getColumnDefinitions(), theRow);
rowGuide = mRowColorGuideGroup
.getColorGuideForRowId(theRow.getStringValueByKey(DataTableColumns.ID));
}

for (int j = indexOfLeftmostColumn; j < indexOfRightmostColumn + 1; j++) {

String datum;
String columnKey = null;
if (this.type == TableLayoutType.STATUS_DATA
Expand Down Expand Up @@ -683,8 +682,11 @@ public void onDraw(Canvas canvas) {
backgroundColor = rowGuide.getBackground();
}
//ColorGuide columnGuide = mColumnColorRules.get(this.mElementKeys.get(j)).getColorGuide(this.mTable.getColumnDefinitions(), theRow);
ColorGuide columnGuide = mColumnColorGuideGroup.get(this.mElementKeys.get(j))
.getColorGuideForRowId(theRow.getStringValueByKey(DataTableColumns.ID));
String checkNull = theRow.getStringValueByKey(DataTableColumns.ID);
ColorGuide columnGuide = null;
if (checkNull != null) {
rowGuide = mRowColorGuideGroup.getColorGuideForRowId(checkNull);
}
// Override the role rule if a column rule matched.
if (columnGuide != null) {
foregroundColor = columnGuide.getForeground();
Expand Down
Binary file modified tables_app/src/main/res/raw/configzip
Binary file not shown.
Binary file modified tables_app/src/main/res/raw/systemzip
Binary file not shown.

0 comments on commit b100d6f

Please sign in to comment.