Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7525dbb

Browse files
authoredNov 28, 2024··
fix: Image loading url issue, added missing argument (#301)
* fix: QB-30077 image load url issue in android native * fix: Updated Glide implementation * fix: Added missing argument
1 parent 6bd30bb commit 7525dbb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎android/src/main/java/com/qliktrialreactnativestraighttable/RowViewHolder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void setData(DataRow dataRow, int rowHeight, CellContentStyle cellContent
7979
if(cell.imageUrl != null) {
8080
String svgTag = "data:image/svg+xml,";
8181
if(cell.imageUrl.startsWith(svgTag)) {
82-
loadSVG(cell, imageView);
82+
loadSVG(cell, imageView, cellView);
8383
} else {
8484
Glide.with(cellView.getContext()).asBitmap().listener(new RequestListener<Bitmap>() {
8585
@Override
@@ -96,7 +96,7 @@ public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> tar
9696
}).load(cell.imageUrl).into(imageView);
9797
}
9898
} else if(cell.qText != null) {
99-
loadSVG(cell, imageView);
99+
loadSVG(cell, imageView, cellView);
100100
}
101101
} else if(column.representation.type.equals("miniChart") && !dataProvider.isDataView) {
102102
LinearLayout.LayoutParams cellViewLayoutParams = new LinearLayout.LayoutParams(column.width, ViewGroup.LayoutParams.MATCH_PARENT);
@@ -135,7 +135,7 @@ public boolean onResourceReady(Bitmap resource, Object model, Target<Bitmap> tar
135135
}
136136
}
137137

138-
private void loadSVG(DataCell cell, ImageView imageView) {
138+
private void loadSVG(DataCell cell, ImageView imageView, CellView cellView) {
139139
String svgTag = "data:image/svg+xml,";
140140
if(cell.qText.startsWith(svgTag)) {
141141
try {
@@ -148,7 +148,7 @@ private void loadSVG(DataCell cell, ImageView imageView) {
148148
Log.e("Image", exception.getMessage());
149149
}
150150
}else {
151-
Glide.with(cellView.getContext()).load(cell.qText).diskCacheStrategy(diskCacheStrategy.DATA).into(imageView);
151+
Glide.with(cellView.getContext()).load(cell.qText).into(imageView);
152152
}
153153
}
154154

0 commit comments

Comments
 (0)
Please sign in to comment.