Skip to content

Commit

Permalink
fix: text only view data (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
gruskal committed Dec 2, 2022
1 parent b5ba7fc commit 8ffed04
Showing 1 changed file with 4 additions and 5 deletions.
Expand Up @@ -59,7 +59,7 @@ public void setData(DataRow dataRow, int rowHeight, CellContentStyle cellContent
}

CellView cellView = (CellView) row.getChildAt(columnIndex);
if(column.representation.type.equals("image")) {
if(column.representation.type.equals("image") && !dataProvider.isDataView) {
LinearLayout.LayoutParams layout = new LinearLayout.LayoutParams(column.width, ViewGroup.LayoutParams.MATCH_PARENT);
cellView.setLayoutParams(layout);
cellView.convertCellContentType("image", column);
Expand All @@ -72,7 +72,7 @@ public void setData(DataRow dataRow, int rowHeight, CellContentStyle cellContent
ClickableImageView imageView = (ClickableImageView) cellView.content;
imageView.setImageBitmap(imageBitmap);
imageView.scaleAndPositionImage(column, imageBitmap);
} else if(column.representation.type.equals("miniChart")) {
} else if(column.representation.type.equals("miniChart") && !dataProvider.isDataView) {
LinearLayout.LayoutParams cellViewLayoutParams = new LinearLayout.LayoutParams(column.width, ViewGroup.LayoutParams.MATCH_PARENT);
cellView.setLayoutParams(cellViewLayoutParams);
cellView.setData(cell, dataRow, column);
Expand All @@ -81,20 +81,19 @@ public void setData(DataRow dataRow, int rowHeight, CellContentStyle cellContent
miniChartView.setData(cell, column);
} else {
cellView.convertCellContentType("text", column);

ClickableTextView textView = (ClickableTextView) cellView.content;
RelativeLayout.LayoutParams textViewLayoutParams = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
textView.setLayoutParams(textViewLayoutParams);
LinearLayout.LayoutParams cellViewLayoutParams = new LinearLayout.LayoutParams(column.width, ViewGroup.LayoutParams.MATCH_PARENT);
cellViewLayoutParams.gravity = Gravity.TOP;
cellView.setLayoutParams(cellViewLayoutParams);

if(column.representation.type.equals("text")) {
if(column.representation.type.equals("text") || dataProvider.isDataView) {
cell.indicator = null;
}

cellView.setData(cell, dataRow, column);
if(column.representation.type.equals("url")) {
if(column.representation.type.equals("url") && !dataProvider.isDataView) {
setupHyperLink(textView);
}
if(column.isDim && cellContentStyle.wrap) {
Expand Down

0 comments on commit 8ffed04

Please sign in to comment.