Fixed attachment list items not showing

This commit is contained in:
2019-09-18 18:59:27 +02:00
committed by Matte23
parent ce8d020986
commit 38b8877d03
2 changed files with 5 additions and 2 deletions

View File

@@ -48,6 +48,10 @@ class CircularLetterAdapter(private val circulars: List<Circular>) :
var favouriteButton: ImageButton = view.circular_favourite_button
var reminderButton: ImageButton = view.circular_reminder_button
var attachmentsList: RecyclerView = view.circulars_attachments_list
init {
attachmentsList.layoutManager = LinearLayoutManager(context)
}
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): CircularLetterViewHolder {
@@ -82,7 +86,6 @@ class CircularLetterAdapter(private val circulars: List<Circular>) :
if (circulars[position].attachmentsNames.isNotEmpty()) {
holder.attachmentsList.visibility = View.VISIBLE
holder.attachmentsList.layoutManager = LinearLayoutManager(context)
holder.attachmentsList.adapter = AttachmentAdapter(
circulars[position].attachmentsNames,
circulars[position].attachmentsUrls

View File

@@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="wrap_content">
<View
android:id="@+id/attachment_divider"