Fixed header issue in recordings + improved layout

This commit is contained in:
Sylvain Berfini 2020-06-29 15:55:43 +02:00
parent 0a33b33888
commit cfd11a40ec
3 changed files with 7 additions and 6 deletions

View file

@ -87,9 +87,7 @@ class RecordingsListAdapter(val selectionViewModel: ListTopBarViewModel) : Lifec
return if (previousPosition >= 0) {
val previousItemDate = getItem(previousPosition).date
!TimestampUtils.isSameDay(date, previousItemDate)
} else {
true
}
} else true
}
override fun getHeaderViewForPosition(context: Context, position: Int): View {

View file

@ -51,7 +51,7 @@ class TimestampUtils {
cal1: Date,
cal2: Date
): Boolean {
return isSameDay(cal1.time, cal2.time)
return isSameDay(cal1.time, cal2.time, false)
}
private fun isSameYear(timestamp: Long, timestampInSecs: Boolean = true): Boolean {

View file

@ -20,8 +20,11 @@
<RelativeLayout
android:onClick="@{clickListener}"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_margin="5dp">
android:layout_height="50dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<ImageView
android:id="@+id/record_play_pause"