use of com.xabber.android.ui.adapter.FilesAdapter in project xabber-android by redsolution.
the class FileMessageVH method setUpFile.
private void setUpFile(RealmList<Attachment> attachments, Context context) {
RealmList<Attachment> fileAttachments = new RealmList<>();
for (Attachment attachment : attachments) {
if (!attachment.isImage())
fileAttachments.add(attachment);
}
if (fileAttachments.size() > 0) {
RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(context);
rvFileList.setLayoutManager(layoutManager);
FilesAdapter adapter = new FilesAdapter(fileAttachments, this);
rvFileList.setAdapter(adapter);
fileLayout.setVisibility(View.VISIBLE);
}
}
Aggregations