Browse code

Initial commit (losing old history)

Dario Rodriguez authored on 08/04/2026 17:25:38
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,185 @@
1
+<?xml version="1.0" encoding="utf-8"?><!--
2
+  ~ Copyright (c) 2023 Samson Achiaga
3
+  ~
4
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
5
+  ~ you may not use this file except in compliance with the License.
6
+  ~ You may obtain a copy of the License at
7
+  ~
8
+  ~     http://www.apache.org/licenses/LICENSE-2.0
9
+  ~
10
+  ~ Unless required by applicable law or agreed to in writing, software
11
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
12
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+  ~ See the License for the specific language governing permissions and
14
+  ~ limitations under the License.
15
+  -->
16
+
17
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
18
+    xmlns:app="http://schemas.android.com/apk/res-auto"
19
+    xmlns:tools="http://schemas.android.com/tools">
20
+
21
+    <data>
22
+
23
+        <import type="com.certified.audionote.utils.Extensions" />
24
+
25
+        <import type="com.certified.audionote.utils.UtilKt" />
26
+
27
+        <variable
28
+            name="note"
29
+            type="com.certified.audionote.model.Note" />
30
+    </data>
31
+
32
+    <com.google.android.material.card.MaterialCardView
33
+        android:layout_width="match_parent"
34
+        android:layout_height="wrap_content"
35
+        app:cardBackgroundColor="@{note.color}"
36
+        app:cardCornerRadius="@dimen/_8sdp"
37
+        app:cardElevation="@dimen/_4sdp"
38
+        app:cardUseCompatPadding="true">
39
+
40
+        <androidx.constraintlayout.widget.ConstraintLayout
41
+            android:layout_width="match_parent"
42
+            android:layout_height="wrap_content"
43
+            android:background="@{note.color}"
44
+            android:paddingBottom="@dimen/_8sdp">
45
+
46
+            <com.google.android.material.textview.MaterialTextView
47
+                android:id="@+id/tv_note_title"
48
+                android:layout_width="0dp"
49
+                android:layout_height="wrap_content"
50
+                android:layout_marginStart="@dimen/_8sdp"
51
+                android:layout_marginTop="@dimen/_8sdp"
52
+                android:layout_marginEnd="@dimen/_4sdp"
53
+                android:ellipsize="end"
54
+                android:fontFamily="@font/open_sans_bold"
55
+                android:maxLines="1"
56
+                android:text="@{note.title}"
57
+                android:textColor="@color/white"
58
+                android:textSize="@dimen/_12ssp"
59
+                app:layout_constraintEnd_toStartOf="@+id/tv_note_last_modification_date"
60
+                app:layout_constraintHorizontal_bias="0.5"
61
+                app:layout_constraintHorizontal_chainStyle="spread_inside"
62
+                app:layout_constraintHorizontal_weight="4"
63
+                app:layout_constraintStart_toStartOf="parent"
64
+                app:layout_constraintTop_toTopOf="parent"
65
+                tools:text="CPE 407 - Lecture 1" />
66
+
67
+            <com.google.android.material.textview.MaterialTextView
68
+                android:id="@+id/tv_note_last_modification_date"
69
+                android:layout_width="0dp"
70
+                android:layout_height="wrap_content"
71
+                android:layout_marginEnd="@dimen/_8sdp"
72
+                android:ellipsize="end"
73
+                android:fontFamily="@font/open_sans_regular"
74
+                android:maxLines="1"
75
+                android:text="@{UtilKt.formatDate(note.lastModificationDate, context)}"
76
+                android:textAlignment="viewEnd"
77
+                android:textColor="@color/white"
78
+                android:textSize="@dimen/_10ssp"
79
+                app:layout_constraintBottom_toBottomOf="@+id/tv_note_title"
80
+                app:layout_constraintEnd_toEndOf="parent"
81
+                app:layout_constraintHorizontal_bias="0.5"
82
+                app:layout_constraintHorizontal_weight="2"
83
+                app:layout_constraintStart_toEndOf="@+id/tv_note_title"
84
+                app:layout_constraintTop_toTopOf="@+id/tv_note_title"
85
+                tools:text="17/11/21" />
86
+
87
+            <androidx.appcompat.widget.AppCompatImageButton
88
+                android:id="@+id/appCompatImageView"
89
+                android:layout_width="wrap_content"
90
+                android:layout_height="wrap_content"
91
+                android:layout_marginTop="@dimen/_8sdp"
92
+                android:background="@null"
93
+                android:padding="@dimen/_4sdp"
94
+                android:tint="@color/white"
95
+                app:layout_constraintEnd_toStartOf="@+id/tv_record_length"
96
+                app:layout_constraintHorizontal_bias="0.5"
97
+                app:layout_constraintHorizontal_chainStyle="spread_inside"
98
+                app:layout_constraintStart_toStartOf="parent"
99
+                app:layout_constraintTop_toBottomOf="@+id/tv_note_title"
100
+                app:srcCompat="@drawable/ic_mic_black_24dp" />
101
+
102
+            <com.google.android.material.textview.MaterialTextView
103
+                android:id="@+id/tv_record_length"
104
+                android:layout_width="wrap_content"
105
+                android:layout_height="wrap_content"
106
+                android:fontFamily="@font/open_sans_bold"
107
+                android:textColor="@color/white"
108
+                android:textSize="@dimen/_12ssp"
109
+                app:layout_constraintBottom_toBottomOf="@+id/appCompatImageView"
110
+                app:layout_constraintEnd_toStartOf="@+id/tv_note_size"
111
+                app:layout_constraintHorizontal_bias="0.5"
112
+                app:layout_constraintStart_toEndOf="@+id/appCompatImageView"
113
+                app:layout_constraintTop_toTopOf="@+id/appCompatImageView"
114
+                app:timeText="@{note.audioLength}"
115
+                tools:text="36:25" />
116
+
117
+            <com.google.android.material.textview.MaterialTextView
118
+                android:id="@+id/tv_note_size"
119
+                android:layout_width="wrap_content"
120
+                android:layout_height="wrap_content"
121
+                android:fontFamily="@font/open_sans_regular"
122
+                android:textColor="@color/white"
123
+                android:textSize="@dimen/_12ssp"
124
+                app:layout_constraintEnd_toEndOf="@+id/tv_note_last_modification_date"
125
+                app:layout_constraintHorizontal_bias="0.5"
126
+                app:layout_constraintStart_toEndOf="@+id/tv_record_length"
127
+                app:layout_constraintTop_toTopOf="@+id/tv_record_length"
128
+                app:sizeText="@{note.size}"
129
+                tools:text="46MB" />
130
+
131
+            <androidx.appcompat.widget.AppCompatImageButton
132
+                android:id="@+id/appCompatImageView2"
133
+                android:layout_width="wrap_content"
134
+                android:layout_height="wrap_content"
135
+                android:layout_marginTop="@dimen/_8sdp"
136
+                android:alpha=".6"
137
+                android:background="@null"
138
+                android:padding="@dimen/_4sdp"
139
+                android:tint="@color/white"
140
+                app:layout_constraintStart_toStartOf="@+id/appCompatImageView"
141
+                app:layout_constraintTop_toBottomOf="@+id/appCompatImageView"
142
+                app:srcCompat="@drawable/ic_alarm_on_black_24dp" />
143
+
144
+            <com.google.android.material.textview.MaterialTextView
145
+                android:id="@+id/tv_reminder_time"
146
+                android:layout_width="0dp"
147
+                android:layout_height="wrap_content"
148
+                android:layout_marginStart="@dimen/_4sdp"
149
+                android:alpha=".6"
150
+                android:ellipsize="end"
151
+                android:fontFamily="@font/open_sans_regular"
152
+                android:maxLines="1"
153
+                android:text="@{UtilKt.formatReminderDate(note.reminder)}"
154
+                android:textAlignment="textEnd"
155
+                android:textColor="@color/white"
156
+                android:textSize="@dimen/_12ssp"
157
+                app:layout_constraintBottom_toBottomOf="@+id/appCompatImageView2"
158
+                app:layout_constraintEnd_toEndOf="@+id/tv_note_size"
159
+                app:layout_constraintStart_toEndOf="@+id/appCompatImageView2"
160
+                app:layout_constraintTop_toTopOf="@+id/appCompatImageView2"
161
+                app:strikeThrough="@{UtilKt.currentDate().timeInMillis > note.reminder}"
162
+                app:visible="@{note.reminder != null}" />
163
+            <!--            tools:text="17 Nov, 2021 8:00 AM"-->
164
+
165
+            <com.google.android.material.textview.MaterialTextView
166
+                android:layout_width="0dp"
167
+                android:layout_height="wrap_content"
168
+                android:layout_marginStart="@dimen/_4sdp"
169
+                android:ellipsize="end"
170
+                android:fontFamily="@font/open_sans_regular"
171
+                android:maxLines="1"
172
+                android:text="@string/no_reminder_set"
173
+                android:textAlignment="viewEnd"
174
+                android:textColor="@color/white"
175
+                android:textSize="@dimen/_12ssp"
176
+                app:layout_constraintBottom_toBottomOf="@+id/appCompatImageView2"
177
+                app:layout_constraintEnd_toEndOf="@+id/tv_note_size"
178
+                app:layout_constraintStart_toEndOf="@+id/appCompatImageView2"
179
+                app:layout_constraintTop_toTopOf="@+id/appCompatImageView2"
180
+                app:visible="@{note.reminder == null}" />
181
+
182
+        </androidx.constraintlayout.widget.ConstraintLayout>
183
+
184
+    </com.google.android.material.card.MaterialCardView>
185
+</layout>
0 186
\ No newline at end of file