Fixed header issue in recordings + improved layout
This commit is contained in:
parent
0a33b33888
commit
cfd11a40ec
3 changed files with 7 additions and 6 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue