use of com.xabber.android.ui.widget.ImageGridBuilder in project xabber-android by redsolution.
the class FileMessageVH method setUpImage.
private void setUpImage(RealmList<Attachment> attachments) {
final ImageGridBuilder gridBuilder = new ImageGridBuilder();
if (!SettingsManager.connectionLoadImages())
return;
RealmList<Attachment> imageAttachments = new RealmList<>();
for (Attachment attachment : attachments) {
if (attachment.isImage())
imageAttachments.add(attachment);
}
if (imageAttachments.size() > 0) {
View imageGridView = gridBuilder.inflateView(imageGridContainer, imageAttachments.size());
gridBuilder.bindView(imageGridView, imageAttachments, this);
imageGridContainer.addView(imageGridView);
imageGridContainer.setVisibility(View.VISIBLE);
}
}
Aggregations