A fork of Simple Time Tracker with WearOS support. (Now integrated upstream)
0

Configure Feed

Select the types of activity you want to include in your feed.

modify choosers in change record layout

razeeman (Dec 3, 2022, 10:56 AM +0300) 14595b59 8f29a558

+409 -211
+2 -1
app/src/main/AndroidManifest.xml
··· 12 12 <activity 13 13 android:name=".ui.MainActivity" 14 14 android:exported="true" 15 - android:launchMode="singleTop"> 15 + android:launchMode="singleTop" 16 + android:windowSoftInputMode="adjustPan"> 16 17 <intent-filter> 17 18 <action android:name="android.intent.action.MAIN" /> 18 19 <category android:name="android.intent.category.LAUNCHER" />
+3 -1
core/src/main/res/values-de/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Aktivität auswählen</string> 91 91 <string name="change_record_type_field">Aktivität</string> 92 92 <string name="change_record_tag_field">Tag</string> 93 - <string name="change_record_comment_hint">Kommentar</string> 93 + <string name="change_record_comment_field">Kommentar</string> 94 + <string name="change_record_comment_hint">Neuen Kommentar eingeben</string> 95 + <string name="change_record_actions_hint">Aktionen</string> 94 96 <string name="change_record_last_comments_hint">Letzte Kommentare</string> 95 97 <string name="change_record_categories_empty">Keine Datensatz-Tags hinzugefügt</string> 96 98 <string name="change_record_save">Speichern</string>
+3 -1
core/src/main/res/values-es/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Seleccione una actividad</string> 91 91 <string name="change_record_type_field">Actividad</string> 92 92 <string name="change_record_tag_field">Etiqueta</string> 93 - <string name="change_record_comment_hint">Comentario</string> 93 + <string name="change_record_comment_field">Comentario</string> 94 + <string name="change_record_comment_hint">Introduce un nuevo comentario</string> 95 + <string name="change_record_actions_hint">Comportamiento</string> 94 96 <string name="change_record_last_comments_hint">Últimos comentarios</string> 95 97 <string name="change_record_categories_empty">No se añadieron etiquetas</string> 96 98 <string name="change_record_save">Guardar</string>
+3 -1
core/src/main/res/values-fr/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Sélectionnez une activité</string> 91 91 <string name="change_record_type_field">Activité</string> 92 92 <string name="change_record_tag_field">Étiquette</string> 93 - <string name="change_record_comment_hint">Commenter</string> 93 + <string name="change_record_comment_field">Commenter</string> 94 + <string name="change_record_comment_hint">Saisir un nouveau commentaire</string> 95 + <string name="change_record_actions_hint">Actions</string> 94 96 <string name="change_record_last_comments_hint">Derniers commentaires</string> 95 97 <string name="change_record_categories_empty">Aucune étiquette d\'enregistrement ajoutée</string> 96 98 <string name="change_record_save">Sauvegarder</string>
+3 -1
core/src/main/res/values-in/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Pilih kegiatan</string> 91 91 <string name="change_record_type_field">Kegiatan</string> 92 92 <string name="change_record_tag_field">Label</string> 93 - <string name="change_record_comment_hint">Komentar</string> 93 + <string name="change_record_comment_field">Komentar</string> 94 + <string name="change_record_comment_hint">Masukkan komentar baru</string> 95 + <string name="change_record_actions_hint">Tindakan</string> 94 96 <string name="change_record_last_comments_hint">Komentar terakhir</string> 95 97 <string name="change_record_categories_empty">Tidak ada label rekaman yang ditambahkan</string> 96 98 <string name="change_record_save">Simpan</string>
+3 -1
core/src/main/res/values-it/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Seleziona attività</string> 91 91 <string name="change_record_type_field">Attività</string> 92 92 <string name="change_record_tag_field">Etichetta</string> 93 - <string name="change_record_comment_hint">Commento</string> 93 + <string name="change_record_comment_field">Commento</string> 94 + <string name="change_record_comment_hint">Inserisci un nuovo commento</string> 95 + <string name="change_record_actions_hint">Azioni</string> 94 96 <string name="change_record_last_comments_hint">Ultimi commenti</string> 95 97 <string name="change_record_categories_empty">Nessuna etichetta aggiunta alla registrazione</string> 96 98 <string name="change_record_save">Salva</string>
+3 -1
core/src/main/res/values-ja/strings.xml
··· 90 90 <string name="change_record_message_choose_type">アクティビティを選択してください</string> 91 91 <string name="change_record_type_field">アクティビティ</string> 92 92 <string name="change_record_tag_field">タグ</string> 93 - <string name="change_record_comment_hint">コメント</string> 93 + <string name="change_record_comment_field">コメント</string> 94 + <string name="change_record_comment_hint">新しいコメントを入力</string> 95 + <string name="change_record_actions_hint">行動</string> 94 96 <string name="change_record_last_comments_hint">最新コメント</string> 95 97 <string name="change_record_categories_empty">計測タグがありません</string> 96 98 <string name="change_record_save">保存</string>
+3 -1
core/src/main/res/values-nl/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Selecteer activiteit</string> 91 91 <string name="change_record_type_field">Activiteit</string> 92 92 <string name="change_record_tag_field">Label</string> 93 - <string name="change_record_comment_hint">Opmerking</string> 93 + <string name="change_record_comment_field">Opmerking</string> 94 + <string name="change_record_comment_hint">Voer een nieuwe opmerking in</string> 95 + <string name="change_record_actions_hint">Acties</string> 94 96 <string name="change_record_last_comments_hint">Laatste opmerkingen</string> 95 97 <string name="change_record_categories_empty">Geen opname labels toegevoegd</string> 96 98 <string name="change_record_save">Opslaan</string>
+3 -1
core/src/main/res/values-pt/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Selecione a atividade</string> 91 91 <string name="change_record_type_field">Atividade</string> 92 92 <string name="change_record_tag_field">Tag</string> 93 - <string name="change_record_comment_hint">Comentário</string> 93 + <string name="change_record_comment_field">Comentário</string> 94 + <string name="change_record_comment_hint">Insira um novo comentário</string> 95 + <string name="change_record_actions_hint">Ações</string> 94 96 <string name="change_record_last_comments_hint">Últimos comentários</string> 95 97 <string name="change_record_categories_empty">Nenhuma tag de registro adicionada</string> 96 98 <string name="change_record_save">Salvar</string>
+3 -1
core/src/main/res/values-ru/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Выберите активность</string> 91 91 <string name="change_record_type_field">Активность</string> 92 92 <string name="change_record_tag_field">Тег</string> 93 - <string name="change_record_comment_hint">Комментарий</string> 93 + <string name="change_record_comment_field">Комментарий</string> 94 + <string name="change_record_comment_hint">Введите новый комментарий</string> 95 + <string name="change_record_actions_hint">Действия</string> 94 96 <string name="change_record_last_comments_hint">Последние комментарии</string> 95 97 <string name="change_record_categories_empty">Теги для записей не добавлены</string> 96 98 <string name="change_record_save">Сохранить</string>
+3 -1
core/src/main/res/values-sv/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Välj aktivitet</string> 91 91 <string name="change_record_type_field">Aktivitet</string> 92 92 <string name="change_record_tag_field">Tagg</string> 93 - <string name="change_record_comment_hint">Kommentar</string> 93 + <string name="change_record_comment_field">Kommentar</string> 94 + <string name="change_record_comment_hint">Skriv en ny kommentar</string> 95 + <string name="change_record_actions_hint">Åtgärder</string> 94 96 <string name="change_record_last_comments_hint">Senaste kommentarer</string> 95 97 <string name="change_record_categories_empty">Ingen händelsetagg vald</string> 96 98 <string name="change_record_save">Spara</string>
+3 -1
core/src/main/res/values-tr/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Aktivite seçin</string> 91 91 <string name="change_record_type_field">Aktivite</string> 92 92 <string name="change_record_tag_field">Etiket</string> 93 - <string name="change_record_comment_hint">Yorum</string> 93 + <string name="change_record_comment_field">Yorum</string> 94 + <string name="change_record_comment_hint">Yeni yorum girin</string> 95 + <string name="change_record_actions_hint">Hareketler</string> 94 96 <string name="change_record_last_comments_hint">Son yorumlar</string> 95 97 <string name="change_record_categories_empty">Kayıt etiketi eklenmedi</string> 96 98 <string name="change_record_save">Kaydet</string>
+3 -1
core/src/main/res/values-uk/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Оберіть активність</string> 91 91 <string name="change_record_type_field">Активність</string> 92 92 <string name="change_record_tag_field">Тег</string> 93 - <string name="change_record_comment_hint">Коментар</string> 93 + <string name="change_record_comment_field">Коментар</string> 94 + <string name="change_record_comment_hint">Введіть новий коментар</string> 95 + <string name="change_record_actions_hint">Дії</string> 94 96 <string name="change_record_last_comments_hint">Останні коментарі</string> 95 97 <string name="change_record_categories_empty">Теги для активності не додані</string> 96 98 <string name="change_record_save">Зберегти</string>
+3 -1
core/src/main/res/values-zh/strings.xml
··· 90 90 <string name="change_record_message_choose_type">选择活动</string> 91 91 <string name="change_record_type_field">活动</string> 92 92 <string name="change_record_tag_field">标签</string> 93 - <string name="change_record_comment_hint">备注</string> 93 + <string name="change_record_comment_field">备注</string> 94 + <string name="change_record_comment_hint">输入新评论</string> 95 + <string name="change_record_actions_hint">动作</string> 94 96 <string name="change_record_last_comments_hint">最后评论</string> 95 97 <string name="change_record_categories_empty">未添加记录标签</string> 96 98 <string name="change_record_save">保存</string>
+3 -1
core/src/main/res/values/strings.xml
··· 90 90 <string name="change_record_message_choose_type">Select activity</string> 91 91 <string name="change_record_type_field">Activity</string> 92 92 <string name="change_record_tag_field">Tag</string> 93 - <string name="change_record_comment_hint">Comment</string> 93 + <string name="change_record_comment_field">Comment</string> 94 + <string name="change_record_comment_hint">Enter new comment</string> 95 + <string name="change_record_actions_hint">Actions</string> 94 96 <string name="change_record_last_comments_hint">Last comments</string> 95 97 <string name="change_record_categories_empty">No record tags added</string> 96 98 <string name="change_record_save">Save</string>
+224 -147
features/feature_change_record/src/main/res/layout/change_record_core_layout.xml
··· 4 4 xmlns:tools="http://schemas.android.com/tools" 5 5 android:layout_width="match_parent" 6 6 android:layout_height="match_parent" 7 - android:animateLayoutChanges="true"> 7 + android:animateLayoutChanges="true" 8 + android:clipChildren="false" 9 + android:clipToPadding="false" 10 + android:paddingTop="8dp"> 8 11 9 - <androidx.cardview.widget.CardView 10 - android:id="@+id/fieldChangeRecordTimeStarted" 11 - style="@style/InputFieldCard" 12 - android:layout_width="0dp" 13 - android:layout_height="@dimen/input_field_height" 14 - android:layout_marginStart="@dimen/input_field_margin" 15 - android:layout_marginTop="8dp" 16 - app:layout_constraintEnd_toStartOf="@id/fieldChangeRecordTimeEnded" 17 - app:layout_constraintStart_toStartOf="parent" 18 - app:layout_constraintTop_toTopOf="parent" 19 - app:layout_goneMarginEnd="@dimen/input_field_margin"> 20 - 21 - <androidx.appcompat.widget.AppCompatTextView 22 - android:id="@+id/tvChangeRecordTimeStarted" 23 - style="@style/InputFieldCardText" 24 - android:layout_width="match_parent" 25 - android:layout_height="match_parent" 26 - android:background="?appInputFieldBorder" 27 - android:gravity="center_vertical" 28 - android:maxLines="1" 29 - app:autoSizeMaxTextSize="16sp" 30 - app:autoSizeMinTextSize="1sp" 31 - app:autoSizeTextType="uniform" 32 - tools:text="15.02.2020 07:35" /> 33 - 34 - </androidx.cardview.widget.CardView> 35 - 36 - <androidx.cardview.widget.CardView 37 - android:id="@+id/fieldChangeRecordTimeEnded" 38 - style="@style/InputFieldCard" 39 - android:layout_width="0dp" 40 - android:layout_height="@dimen/input_field_height" 41 - android:layout_marginTop="8dp" 42 - android:layout_marginEnd="@dimen/input_field_margin" 43 - app:layout_constraintEnd_toEndOf="parent" 44 - app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeStarted" 12 + <androidx.constraintlayout.widget.ConstraintLayout 13 + android:id="@+id/containerChangeRecordTimes" 14 + android:layout_width="match_parent" 15 + android:layout_height="wrap_content" 45 16 app:layout_constraintTop_toTopOf="parent"> 46 17 47 - <androidx.appcompat.widget.AppCompatTextView 48 - android:id="@+id/tvChangeRecordTimeEnded" 49 - style="@style/InputFieldCardText" 50 - android:layout_width="match_parent" 51 - android:layout_height="match_parent" 52 - android:background="?appInputFieldBorder" 53 - android:gravity="center_vertical" 54 - android:maxLines="1" 55 - app:autoSizeMaxTextSize="16sp" 56 - app:autoSizeMinTextSize="1sp" 57 - app:autoSizeTextType="uniform" 58 - tools:text="15.02.2020 11:58" /> 18 + <androidx.cardview.widget.CardView 19 + android:id="@+id/fieldChangeRecordTimeStarted" 20 + style="@style/InputFieldCard" 21 + android:layout_width="0dp" 22 + android:layout_height="@dimen/input_field_height" 23 + android:layout_marginStart="@dimen/input_field_margin" 24 + app:layout_constraintEnd_toStartOf="@id/fieldChangeRecordTimeEnded" 25 + app:layout_constraintStart_toStartOf="parent" 26 + app:layout_constraintTop_toTopOf="parent" 27 + app:layout_goneMarginEnd="@dimen/input_field_margin"> 59 28 60 - </androidx.cardview.widget.CardView> 29 + <androidx.appcompat.widget.AppCompatTextView 30 + android:id="@+id/tvChangeRecordTimeStarted" 31 + style="@style/InputFieldCardText" 32 + android:layout_width="match_parent" 33 + android:layout_height="match_parent" 34 + android:background="?appInputFieldBorder" 35 + android:gravity="center_vertical" 36 + android:maxLines="1" 37 + app:autoSizeMaxTextSize="16sp" 38 + app:autoSizeMinTextSize="1sp" 39 + app:autoSizeTextType="uniform" 40 + tools:text="15.02.2020 07:35" /> 61 41 62 - <Space 63 - android:id="@+id/spaceChangeRecordTimeStartedEnd" 64 - android:layout_width="8dp" 65 - android:layout_height="wrap_content" 66 - app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeStarted" 67 - app:layout_constraintTop_toTopOf="@id/fieldChangeRecordTimeStarted" /> 42 + </androidx.cardview.widget.CardView> 68 43 69 - <Space 70 - android:id="@+id/spaceChangeRecordTimeStartedTop" 71 - android:layout_width="wrap_content" 72 - android:layout_height="12dp" 73 - app:layout_constraintBottom_toTopOf="@id/fieldChangeRecordTimeStarted" 74 - app:layout_constraintEnd_toEndOf="@id/fieldChangeRecordTimeStarted" /> 44 + <androidx.cardview.widget.CardView 45 + android:id="@+id/fieldChangeRecordTimeEnded" 46 + style="@style/InputFieldCard" 47 + android:layout_width="0dp" 48 + android:layout_height="@dimen/input_field_height" 49 + android:layout_marginEnd="@dimen/input_field_margin" 50 + app:layout_constraintEnd_toEndOf="parent" 51 + app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeStarted" 52 + app:layout_constraintTop_toTopOf="parent"> 75 53 76 - <androidx.cardview.widget.CardView 77 - android:id="@+id/btnChangeRecordTimeStartedAdjust" 78 - style="@style/InputFieldCard" 79 - android:layout_width="wrap_content" 80 - android:layout_height="wrap_content" 81 - app:layout_constraintEnd_toEndOf="@id/spaceChangeRecordTimeStartedEnd" 82 - app:layout_constraintTop_toTopOf="@id/spaceChangeRecordTimeStartedTop"> 54 + <androidx.appcompat.widget.AppCompatTextView 55 + android:id="@+id/tvChangeRecordTimeEnded" 56 + style="@style/InputFieldCardText" 57 + android:layout_width="match_parent" 58 + android:layout_height="match_parent" 59 + android:background="?appInputFieldBorder" 60 + android:gravity="center_vertical" 61 + android:maxLines="1" 62 + app:autoSizeMaxTextSize="16sp" 63 + app:autoSizeMinTextSize="1sp" 64 + app:autoSizeTextType="uniform" 65 + tools:text="15.02.2020 11:58" /> 83 66 84 - <androidx.appcompat.widget.AppCompatTextView style="@style/ButtonTimeAdjust" /> 67 + </androidx.cardview.widget.CardView> 85 68 86 - </androidx.cardview.widget.CardView> 69 + <Space 70 + android:id="@+id/spaceChangeRecordTimeStartedEnd" 71 + android:layout_width="8dp" 72 + android:layout_height="wrap_content" 73 + app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeStarted" 74 + app:layout_constraintTop_toTopOf="@id/fieldChangeRecordTimeStarted" /> 87 75 88 - <Space 89 - android:id="@+id/spaceChangeRecordTimeEndedEnd" 90 - android:layout_width="8dp" 91 - android:layout_height="wrap_content" 92 - app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeEnded" 93 - app:layout_constraintTop_toTopOf="@id/fieldChangeRecordTimeEnded" /> 76 + <Space 77 + android:id="@+id/spaceChangeRecordTimeStartedTop" 78 + android:layout_width="wrap_content" 79 + android:layout_height="12dp" 80 + app:layout_constraintBottom_toTopOf="@id/fieldChangeRecordTimeStarted" 81 + app:layout_constraintEnd_toEndOf="@id/fieldChangeRecordTimeStarted" /> 94 82 95 - <Space 96 - android:id="@+id/spaceChangeRecordTimeEndedTop" 97 - android:layout_width="wrap_content" 98 - android:layout_height="12dp" 99 - app:layout_constraintBottom_toTopOf="@id/fieldChangeRecordTimeEnded" 100 - app:layout_constraintEnd_toEndOf="@id/fieldChangeRecordTimeEnded" /> 83 + <androidx.cardview.widget.CardView 84 + android:id="@+id/btnChangeRecordTimeStartedAdjust" 85 + style="@style/InputFieldCard" 86 + android:layout_width="wrap_content" 87 + android:layout_height="wrap_content" 88 + app:layout_constraintEnd_toEndOf="@id/spaceChangeRecordTimeStartedEnd" 89 + app:layout_constraintTop_toTopOf="@id/spaceChangeRecordTimeStartedTop"> 101 90 102 - <androidx.cardview.widget.CardView 103 - android:id="@+id/btnChangeRecordTimeEndedAdjust" 104 - style="@style/InputFieldCard" 105 - android:layout_width="wrap_content" 106 - android:layout_height="wrap_content" 107 - app:layout_constraintEnd_toEndOf="@id/spaceChangeRecordTimeEndedEnd" 108 - app:layout_constraintTop_toTopOf="@id/spaceChangeRecordTimeEndedTop"> 91 + <androidx.appcompat.widget.AppCompatTextView style="@style/ButtonTimeAdjust" /> 109 92 110 - <androidx.appcompat.widget.AppCompatTextView style="@style/ButtonTimeAdjust" /> 93 + </androidx.cardview.widget.CardView> 111 94 112 - </androidx.cardview.widget.CardView> 95 + <Space 96 + android:id="@+id/spaceChangeRecordTimeEndedEnd" 97 + android:layout_width="8dp" 98 + android:layout_height="wrap_content" 99 + app:layout_constraintStart_toEndOf="@id/fieldChangeRecordTimeEnded" 100 + app:layout_constraintTop_toTopOf="@id/fieldChangeRecordTimeEnded" /> 101 + 102 + <Space 103 + android:id="@+id/spaceChangeRecordTimeEndedTop" 104 + android:layout_width="wrap_content" 105 + android:layout_height="12dp" 106 + app:layout_constraintBottom_toTopOf="@id/fieldChangeRecordTimeEnded" 107 + app:layout_constraintEnd_toEndOf="@id/fieldChangeRecordTimeEnded" /> 108 + 109 + <androidx.cardview.widget.CardView 110 + android:id="@+id/btnChangeRecordTimeEndedAdjust" 111 + style="@style/InputFieldCard" 112 + android:layout_width="wrap_content" 113 + android:layout_height="wrap_content" 114 + app:layout_constraintEnd_toEndOf="@id/spaceChangeRecordTimeEndedEnd" 115 + app:layout_constraintTop_toTopOf="@id/spaceChangeRecordTimeEndedTop"> 116 + 117 + <androidx.appcompat.widget.AppCompatTextView style="@style/ButtonTimeAdjust" /> 118 + 119 + </androidx.cardview.widget.CardView> 120 + 121 + </androidx.constraintlayout.widget.ConstraintLayout> 113 122 114 123 <com.example.util.simpletimetracker.core.view.timeAdjustment.TimeAdjustmentView 115 124 android:id="@+id/containerChangeRecordTimeAdjust" ··· 119 128 android:layout_marginEnd="@dimen/input_field_margin" 120 129 android:visibility="gone" 121 130 app:layout_constraintStart_toStartOf="parent" 122 - app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordTimeStarted" 131 + app:layout_constraintTop_toBottomOf="@id/containerChangeRecordTimes" 123 132 tools:visibility="visible" /> 124 133 125 134 <androidx.cardview.widget.CardView ··· 130 139 android:layout_marginStart="@dimen/input_field_margin" 131 140 app:layout_constraintEnd_toStartOf="@id/fieldChangeRecordCategory" 132 141 app:layout_constraintStart_toStartOf="parent" 133 - app:layout_constraintTop_toBottomOf="@id/containerChangeRecordTimeAdjust"> 142 + app:layout_constraintTop_toBottomOf="@id/containerChangeRecordTimeAdjust" 143 + app:layout_goneMarginEnd="@dimen/input_field_margin"> 134 144 135 145 <androidx.constraintlayout.widget.ConstraintLayout 136 146 android:layout_width="match_parent" ··· 170 180 android:layout_marginEnd="@dimen/input_field_margin" 171 181 app:layout_constraintEnd_toEndOf="parent" 172 182 app:layout_constraintStart_toEndOf="@id/fieldChangeRecordType" 173 - app:layout_constraintTop_toBottomOf="@id/containerChangeRecordTimeAdjust"> 183 + app:layout_constraintTop_toBottomOf="@id/containerChangeRecordTimeAdjust" 184 + app:layout_goneMarginStart="@dimen/input_field_margin"> 174 185 175 186 <androidx.constraintlayout.widget.ConstraintLayout 176 187 android:layout_width="match_parent" ··· 204 215 205 216 </androidx.cardview.widget.CardView> 206 217 218 + <androidx.cardview.widget.CardView 219 + android:id="@+id/fieldChangeRecordComment" 220 + style="@style/InputFieldCard" 221 + android:layout_width="0dp" 222 + android:layout_height="@dimen/input_field_height" 223 + android:layout_marginStart="@dimen/input_field_margin" 224 + app:layout_constraintEnd_toStartOf="@id/fieldChangeRecordAction" 225 + app:layout_constraintStart_toStartOf="parent" 226 + app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordType" 227 + app:layout_goneMarginEnd="@dimen/input_field_margin"> 228 + 229 + <androidx.constraintlayout.widget.ConstraintLayout 230 + android:layout_width="match_parent" 231 + android:layout_height="match_parent" 232 + android:background="?appInputFieldBorder"> 233 + 234 + <androidx.appcompat.widget.AppCompatTextView 235 + style="@style/InputFieldCardText" 236 + android:layout_width="0dp" 237 + android:layout_height="match_parent" 238 + android:gravity="center_vertical" 239 + android:text="@string/change_record_comment_field" 240 + app:layout_constraintEnd_toStartOf="@id/arrowChangeRecordComment" 241 + app:layout_constraintStart_toStartOf="parent" /> 242 + 243 + <ImageView 244 + android:id="@+id/arrowChangeRecordComment" 245 + android:layout_width="24dp" 246 + android:layout_height="24dp" 247 + android:layout_marginEnd="8dp" 248 + android:background="?selectableItemBackgroundBorderless" 249 + android:src="?appArrow" 250 + app:layout_constraintBottom_toBottomOf="parent" 251 + app:layout_constraintEnd_toEndOf="parent" 252 + app:layout_constraintTop_toTopOf="parent" 253 + tools:ignore="ContentDescription" /> 254 + 255 + </androidx.constraintlayout.widget.ConstraintLayout> 256 + 257 + </androidx.cardview.widget.CardView> 258 + 259 + <androidx.cardview.widget.CardView 260 + android:id="@+id/fieldChangeRecordAction" 261 + style="@style/InputFieldCard" 262 + android:layout_width="0dp" 263 + android:layout_height="@dimen/input_field_height" 264 + android:layout_marginEnd="@dimen/input_field_margin" 265 + app:layout_constraintEnd_toEndOf="parent" 266 + app:layout_constraintStart_toEndOf="@id/fieldChangeRecordComment" 267 + app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordCategory" 268 + app:layout_goneMarginStart="@dimen/input_field_margin"> 269 + 270 + <androidx.constraintlayout.widget.ConstraintLayout 271 + android:layout_width="match_parent" 272 + android:layout_height="match_parent" 273 + android:background="?appInputFieldBorder"> 274 + 275 + <androidx.appcompat.widget.AppCompatTextView 276 + style="@style/InputFieldCardText" 277 + android:layout_width="0dp" 278 + android:layout_height="match_parent" 279 + android:ellipsize="end" 280 + android:gravity="center_vertical" 281 + android:maxLines="1" 282 + android:text="@string/change_record_actions_hint" 283 + app:layout_constraintEnd_toStartOf="@id/arrowChangeRecordAction" 284 + app:layout_constraintStart_toStartOf="parent" /> 285 + 286 + <ImageView 287 + android:id="@+id/arrowChangeRecordAction" 288 + android:layout_width="24dp" 289 + android:layout_height="24dp" 290 + android:layout_marginEnd="8dp" 291 + android:background="?selectableItemBackgroundBorderless" 292 + android:src="?appArrow" 293 + app:layout_constraintBottom_toBottomOf="parent" 294 + app:layout_constraintEnd_toEndOf="parent" 295 + app:layout_constraintTop_toTopOf="parent" 296 + tools:ignore="ContentDescription" /> 297 + 298 + </androidx.constraintlayout.widget.ConstraintLayout> 299 + 300 + </androidx.cardview.widget.CardView> 301 + 302 + <androidx.constraintlayout.widget.Barrier 303 + android:id="@+id/barrierChangeRecord" 304 + android:layout_width="match_parent" 305 + android:layout_height="wrap_content" 306 + app:barrierDirection="bottom" 307 + app:constraint_referenced_ids="fieldChangeRecordComment, fieldChangeRecordAction" /> 308 + 207 309 <androidx.core.widget.NestedScrollView 310 + android:id="@+id/containerChangeRecordComment" 208 311 android:layout_width="match_parent" 209 312 android:layout_height="0dp" 313 + android:visibility="gone" 210 314 app:layout_constraintBottom_toTopOf="@id/btnChangeRecordSave" 211 - app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordType"> 315 + app:layout_constraintTop_toBottomOf="@id/barrierChangeRecord" 316 + tools:visibility="gone"> 212 317 213 318 <androidx.appcompat.widget.LinearLayoutCompat 214 319 android:layout_width="match_parent" 215 320 android:layout_height="wrap_content" 216 - android:clipChildren="false" 217 321 android:orientation="vertical"> 218 322 219 323 <com.google.android.material.textfield.TextInputLayout ··· 232 336 233 337 </com.google.android.material.textfield.TextInputLayout> 234 338 235 - <androidx.cardview.widget.CardView 236 - android:id="@+id/fieldChangeRecordLastComments" 237 - style="@style/InputFieldCard" 238 - android:layout_width="match_parent" 239 - android:layout_height="wrap_content" 240 - android:layout_marginHorizontal="20dp" 241 - android:clipChildren="false" 242 - android:clipToPadding="false" 243 - android:visibility="gone" 244 - tools:visibility="visible"> 245 - 246 - <androidx.constraintlayout.widget.ConstraintLayout 247 - android:layout_width="match_parent" 248 - android:layout_height="wrap_content" 249 - android:clipChildren="false" 250 - android:clipToPadding="false"> 251 - 252 - <androidx.appcompat.widget.AppCompatTextView 253 - style="@style/InputFieldCardText" 254 - android:layout_width="0dp" 255 - android:layout_height="match_parent" 256 - android:gravity="center_vertical" 257 - android:paddingVertical="4dp" 258 - android:text="@string/change_record_last_comments_hint" 259 - android:textColor="?appTextHintColor" 260 - app:layout_constraintEnd_toStartOf="@id/arrowChangeRecordLastComment" 261 - app:layout_constraintStart_toStartOf="parent" /> 262 - 263 - <ImageView 264 - android:id="@+id/arrowChangeRecordLastComment" 265 - android:layout_width="24dp" 266 - android:layout_height="24dp" 267 - android:layout_marginEnd="6dp" 268 - android:background="?selectableItemBackgroundBorderless" 269 - android:src="?appArrow" 270 - app:layout_constraintBottom_toBottomOf="parent" 271 - app:layout_constraintEnd_toEndOf="parent" 272 - app:layout_constraintTop_toTopOf="parent" 273 - tools:ignore="ContentDescription" /> 274 - 275 - </androidx.constraintlayout.widget.ConstraintLayout> 276 - 277 - </androidx.cardview.widget.CardView> 278 - 279 339 <androidx.recyclerview.widget.RecyclerView 280 340 android:id="@+id/rvChangeRecordLastComments" 281 341 android:layout_width="match_parent" 282 342 android:layout_height="wrap_content" 283 343 android:layout_marginHorizontal="20dp" 284 344 android:overScrollMode="never" 285 - android:visibility="gone" 286 345 tools:itemCount="3" 287 - tools:listitem="@layout/change_record_comment_item" 288 - tools:visibility="visible" /> 346 + tools:listitem="@layout/change_record_comment_item" /> 347 + 348 + </androidx.appcompat.widget.LinearLayoutCompat> 349 + 350 + </androidx.core.widget.NestedScrollView> 351 + 352 + <androidx.core.widget.NestedScrollView 353 + android:id="@+id/containerChangeRecordAction" 354 + android:layout_width="match_parent" 355 + android:layout_height="0dp" 356 + android:visibility="gone" 357 + app:layout_constraintBottom_toTopOf="@id/btnChangeRecordSave" 358 + app:layout_constraintTop_toBottomOf="@id/barrierChangeRecord" 359 + tools:visibility="gone"> 360 + 361 + <androidx.appcompat.widget.LinearLayoutCompat 362 + android:layout_width="match_parent" 363 + android:layout_height="wrap_content" 364 + android:orientation="vertical"> 289 365 290 366 <androidx.constraintlayout.widget.ConstraintLayout 291 367 android:id="@+id/containerChangeRecordSplit" 292 368 android:layout_width="match_parent" 293 - android:layout_height="wrap_content"> 369 + android:layout_height="wrap_content" 370 + android:animateLayoutChanges="true"> 294 371 295 372 <androidx.cardview.widget.CardView 296 373 android:id="@+id/fieldChangeRecordTimeSplit" ··· 383 460 android:visibility="gone" 384 461 app:layout_constraintBottom_toTopOf="@id/btnChangeRecordSave" 385 462 app:layout_constraintStart_toStartOf="parent" 386 - app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordType" 463 + app:layout_constraintTop_toBottomOf="@id/barrierChangeRecord" 387 464 tools:itemCount="3" 388 465 tools:listitem="@layout/item_record_type_layout" 389 466 tools:visibility="gone" /> ··· 397 474 android:visibility="gone" 398 475 app:layout_constraintBottom_toTopOf="@id/btnChangeRecordSave" 399 476 app:layout_constraintEnd_toEndOf="parent" 400 - app:layout_constraintTop_toBottomOf="@id/fieldChangeRecordCategory" 477 + app:layout_constraintTop_toBottomOf="@id/barrierChangeRecord" 401 478 tools:itemCount="3" 402 479 tools:listitem="@layout/item_category_layout" 403 480 tools:visibility="gone" />
+1 -1
data_local/src/main/java/com/example/util/simpletimetracker/data_local/resolver/IcsRepoImpl.kt
··· 37 37 ) : IcsRepo { 38 38 39 39 private val commentTitle: String by lazy { 40 - resourceRepo.getString(R.string.change_record_comment_hint) 40 + resourceRepo.getString(R.string.change_record_comment_field) 41 41 } 42 42 private val categoryTitle: String by lazy { 43 43 resourceRepo.getString(R.string.category_hint)
+7
features/feature_change_record/src/main/java/com/example/util/simpletimetracker/feature_change_record/interactor/ChangeRecordViewDataInteractor.kt
··· 10 10 import com.example.util.simpletimetracker.domain.interactor.RunningRecordInteractor 11 11 import com.example.util.simpletimetracker.domain.model.Record 12 12 import com.example.util.simpletimetracker.feature_base_adapter.ViewHolderType 13 + import com.example.util.simpletimetracker.feature_base_adapter.hint.HintViewData 13 14 import com.example.util.simpletimetracker.feature_change_record.R 14 15 import com.example.util.simpletimetracker.feature_change_record.mapper.ChangeRecordViewDataMapper 15 16 import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordCommentViewData ··· 64 65 .toSet() 65 66 .take(LAST_COMMENTS_TO_SHOW) 66 67 .map { ChangeRecordCommentViewData(it) } 68 + .takeUnless { it.isEmpty() } 69 + ?.let { 70 + HintViewData( 71 + text = resourceRepo.getString(R.string.change_record_last_comments_hint) 72 + ).let(::listOf) + it 73 + }.orEmpty() 67 74 } 68 75 69 76 fun getTimeAdjustmentItems(): List<ViewHolderType> {
+70 -26
features/feature_change_record/src/main/java/com/example/util/simpletimetracker/feature_change_record/view/ChangeRecordCore.kt
··· 1 1 package com.example.util.simpletimetracker.feature_change_record.view 2 2 3 + import android.view.View 4 + import androidx.cardview.widget.CardView 3 5 import androidx.core.view.isVisible 4 6 import androidx.core.widget.doAfterTextChanged 5 7 import androidx.viewbinding.ViewBinding ··· 17 19 import com.example.util.simpletimetracker.feature_base_adapter.recordType.createRecordTypeAdapterDelegate 18 20 import com.example.util.simpletimetracker.feature_change_record.adapter.createChangeRecordCommentAdapterDelegate 19 21 import com.example.util.simpletimetracker.feature_change_record.databinding.ChangeRecordCoreLayoutBinding 22 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState 23 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState.State.Action 24 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState.State.Activity 25 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState.State.Closed 26 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState.State.Comment 27 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState.State.Tag 20 28 import com.example.util.simpletimetracker.feature_change_record.viewData.TimeAdjustmentState 21 29 import com.example.util.simpletimetracker.feature_change_record.viewModel.ChangeRecordBaseViewModel 22 30 import com.example.util.simpletimetracker.feature_views.extension.rotateDown ··· 53 61 } 54 62 private val commentsAdapter: BaseRecyclerAdapter by lazy { 55 63 BaseRecyclerAdapter( 64 + createHintAdapterDelegate(), 56 65 createChangeRecordCommentAdapterDelegate(viewModel::onCommentClick), 57 66 ) 58 67 } ··· 94 103 etChangeRecordComment.doAfterTextChanged { viewModel.onCommentChange(it.toString()) } 95 104 fieldChangeRecordType.setOnClick(viewModel::onTypeChooserClick) 96 105 fieldChangeRecordCategory.setOnClick(viewModel::onCategoryChooserClick) 106 + fieldChangeRecordComment.setOnClick(viewModel::onCommentChooserClick) 107 + fieldChangeRecordAction.setOnClick(viewModel::onActionChooserClick) 97 108 fieldChangeRecordTimeStarted.setOnClick(viewModel::onTimeStartedClick) 98 109 fieldChangeRecordTimeEnded.setOnClick(viewModel::onTimeEndedClick) 99 110 fieldChangeRecordTimeSplit.setOnClick(viewModel::onTimeSplitClick) 100 - fieldChangeRecordLastComments.setOnClick(viewModel::onLastCommentsChooserClick) 101 111 btnChangeRecordTimeStartedAdjust.setOnClick(viewModel::onAdjustTimeStartedClick) 102 112 btnChangeRecordTimeEndedAdjust.setOnClick(viewModel::onAdjustTimeEndedClick) 103 113 btnChangeRecordTimeSplitAdjust.setOnClick(viewModel::onAdjustTimeSplitClick) ··· 124 134 splitButtonEnabled.observe(btnChangeRecordSplit::setEnabled) 125 135 timeAdjustmentItems.observe(containerChangeRecordTimeAdjust.adapter::replace) 126 136 timeSplitAdjustmentItems.observe(containerChangeRecordTimeSplitAdjust.adapter::replace) 127 - flipTypesChooser.observe { opened -> 128 - rvChangeRecordType.visible = opened 129 - fieldChangeRecordType.setChooserColor(opened) 130 - arrowChangeRecordType.apply { 131 - if (opened) rotateDown() else rotateUp() 132 - } 133 - } 134 - flipCategoryChooser.observe { opened -> 135 - rvChangeRecordCategories.visible = opened 136 - fieldChangeRecordCategory.setChooserColor(opened) 137 - arrowChangeRecordCategory.apply { 138 - if (opened) rotateDown() else rotateUp() 139 - } 140 - } 141 - flipLastCommentsChooser.observe { opened -> 142 - rvChangeRecordLastComments.visible = opened 143 - fieldChangeRecordLastComments.setChooserColor(opened) 144 - arrowChangeRecordLastComment.apply { 145 - if (opened) rotateDown() else rotateUp() 146 - } 147 - } 137 + chooserState.observe { updateChooserState(it, binding) } 148 138 keyboardVisibility.observe { visible -> 149 139 if (visible) showKeyboard(etChangeRecordComment) 150 140 else hideKeyboard() ··· 159 149 btnChangeRecordTimeSplitAdjust.setChooserColor(opened) 160 150 } 161 151 timeSplitText.observe(tvChangeRecordTimeSplit::setText) 162 - lastComments.observe { data -> 163 - fieldChangeRecordLastComments.visible = data.isNotEmpty() 164 - commentsAdapter.replace(data) 165 - } 152 + lastComments.observe(commentsAdapter::replace) 166 153 comment.observe { updateUi(binding, it) } 167 154 } 168 155 } ··· 173 160 ) = with(binding) { 174 161 etChangeRecordComment.setText(comment) 175 162 etChangeRecordComment.setSelection(comment.length) 163 + } 164 + 165 + private fun updateChooserState( 166 + state: ChangeRecordChooserState, 167 + binding: ChangeRecordCoreLayoutBinding, 168 + ) = with(binding) { 169 + updateChooser<Activity>( 170 + state = state, 171 + chooserData = rvChangeRecordType, 172 + chooserView = fieldChangeRecordType, 173 + chooserArrow = arrowChangeRecordType, 174 + ) 175 + updateChooser<Tag>( 176 + state = state, 177 + chooserData = rvChangeRecordCategories, 178 + chooserView = fieldChangeRecordCategory, 179 + chooserArrow = arrowChangeRecordCategory, 180 + ) 181 + updateChooser<Comment>( 182 + state = state, 183 + chooserData = containerChangeRecordComment, 184 + chooserView = fieldChangeRecordComment, 185 + chooserArrow = arrowChangeRecordComment, 186 + ) 187 + updateChooser<Action>( 188 + state = state, 189 + chooserData = containerChangeRecordAction, 190 + chooserView = fieldChangeRecordAction, 191 + chooserArrow = arrowChangeRecordAction, 192 + ) 193 + 194 + val isClosed = state.current is Closed 195 + containerChangeRecordTimes.isVisible = isClosed 196 + 197 + // Chooser fields 198 + fieldChangeRecordType.isVisible = isClosed || state.current is Activity 199 + fieldChangeRecordCategory.isVisible = isClosed || state.current is Tag 200 + fieldChangeRecordComment.isVisible = isClosed || state.current is Comment 201 + fieldChangeRecordAction.isVisible = isClosed || state.current is Action 202 + } 203 + 204 + private inline fun <reified T : ChangeRecordChooserState.State> updateChooser( 205 + state: ChangeRecordChooserState, 206 + chooserData: View, 207 + chooserView: CardView, 208 + chooserArrow: View, 209 + ) { 210 + val opened = state.current is T 211 + val opening = state.previous is Closed && state.current is T 212 + val closing = state.previous is T && state.current is Closed 213 + 214 + chooserData.isVisible = opened 215 + chooserView.setChooserColor(opened) 216 + chooserArrow.apply { 217 + if (opening) rotateDown() 218 + if (closing) rotateUp() 219 + } 176 220 } 177 221 }
+15
features/feature_change_record/src/main/java/com/example/util/simpletimetracker/feature_change_record/viewData/ChangeRecordChooserState.kt
··· 1 + package com.example.util.simpletimetracker.feature_change_record.viewData 2 + 3 + data class ChangeRecordChooserState( 4 + val current: State, 5 + val previous: State, 6 + ) { 7 + 8 + sealed interface State { 9 + object Closed : State 10 + object Activity : State 11 + object Tag : State 12 + object Comment : State 13 + object Action : State 14 + } 15 + }
+40 -16
features/feature_change_record/src/main/java/com/example/util/simpletimetracker/feature_change_record/viewModel/ChangeRecordBaseViewModel.kt
··· 13 13 import com.example.util.simpletimetracker.core.view.timeAdjustment.TimeAdjustmentView 14 14 import com.example.util.simpletimetracker.domain.extension.flip 15 15 import com.example.util.simpletimetracker.domain.extension.orFalse 16 - import com.example.util.simpletimetracker.domain.extension.orTrue 17 16 import com.example.util.simpletimetracker.domain.interactor.PrefsInteractor 18 17 import com.example.util.simpletimetracker.feature_base_adapter.ViewHolderType 19 18 import com.example.util.simpletimetracker.feature_base_adapter.category.CategoryViewData 20 19 import com.example.util.simpletimetracker.feature_base_adapter.recordType.RecordTypeViewData 21 20 import com.example.util.simpletimetracker.feature_change_record.R 22 21 import com.example.util.simpletimetracker.feature_change_record.interactor.ChangeRecordViewDataInteractor 22 + import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordChooserState 23 23 import com.example.util.simpletimetracker.feature_change_record.viewData.ChangeRecordCommentViewData 24 24 import com.example.util.simpletimetracker.feature_change_record.viewData.TimeAdjustmentState 25 25 import com.example.util.simpletimetracker.navigation.Router ··· 71 71 val timeSplitAdjustmentItems: LiveData<List<ViewHolderType>> by lazy { 72 72 MutableLiveData(loadTimeSplitAdjustmentItems()) 73 73 } 74 + val chooserState: LiveData<ChangeRecordChooserState> = MutableLiveData( 75 + ChangeRecordChooserState( 76 + current = ChangeRecordChooserState.State.Closed, 77 + previous = ChangeRecordChooserState.State.Closed, 78 + ) 79 + ) 74 80 val timeAdjustmentState: LiveData<TimeAdjustmentState> = MutableLiveData(TimeAdjustmentState.HIDDEN) 75 81 val timeSplitAdjustmentState: LiveData<Boolean> = MutableLiveData(false) 76 82 val timeSplitText: LiveData<String> = MutableLiveData() 77 - val flipTypesChooser: LiveData<Boolean> = MutableLiveData() 78 - val flipCategoryChooser: LiveData<Boolean> = MutableLiveData() 79 - val flipLastCommentsChooser: LiveData<Boolean> = MutableLiveData() 80 83 val saveButtonEnabled: LiveData<Boolean> = MutableLiveData(true) 81 84 val splitButtonEnabled: LiveData<Boolean> = MutableLiveData(true) 82 85 val keyboardVisibility: LiveData<Boolean> = MutableLiveData(false) ··· 99 102 protected abstract suspend fun onSplitClickDelegate() 100 103 101 104 fun onTypeChooserClick() { 102 - keyboardVisibility.set(false) 103 - flipTypesChooser.set(flipTypesChooser.value?.flip().orTrue()) 104 - if (flipCategoryChooser.value == true) flipCategoryChooser.set(false) 105 + onNewChooserState(ChangeRecordChooserState.State.Activity) 105 106 } 106 107 107 108 fun onCategoryChooserClick() { 108 - keyboardVisibility.set(false) 109 - flipCategoryChooser.set(flipCategoryChooser.value?.flip().orTrue()) 110 - if (flipTypesChooser.value == true) flipTypesChooser.set(false) 109 + onNewChooserState(ChangeRecordChooserState.State.Tag) 110 + } 111 + 112 + fun onCommentChooserClick() { 113 + onNewChooserState(ChangeRecordChooserState.State.Comment) 114 + } 115 + 116 + fun onActionChooserClick() { 117 + onNewChooserState(ChangeRecordChooserState.State.Action) 111 118 } 112 119 113 120 fun onTimeStartedClick() { ··· 120 127 121 128 fun onTimeSplitClick() { 122 129 onTimeClick(tag = TIME_SPLIT_TAG, timestamp = newTimeSplit) 123 - } 124 - 125 - fun onLastCommentsChooserClick() { 126 - val newValue = flipLastCommentsChooser.value?.flip().orTrue() 127 - flipLastCommentsChooser.set(newValue) 128 130 } 129 131 130 132 fun onSaveClick() { ··· 291 293 } 292 294 } 293 295 296 + private fun onNewChooserState( 297 + newState: ChangeRecordChooserState.State, 298 + ) { 299 + val current = chooserState.value?.current ?: ChangeRecordChooserState.State.Closed 300 + keyboardVisibility.set(false) 301 + timeAdjustmentState.set(TimeAdjustmentState.HIDDEN) 302 + if (current == newState) { 303 + chooserState.set( 304 + ChangeRecordChooserState( 305 + current = ChangeRecordChooserState.State.Closed, 306 + previous = current, 307 + ) 308 + ) 309 + } else { 310 + chooserState.set( 311 + ChangeRecordChooserState( 312 + current = newState, 313 + previous = current 314 + ) 315 + ) 316 + } 317 + } 318 + 294 319 private fun onTimeClick( 295 320 tag: String, 296 321 timestamp: Long, ··· 407 432 private fun updateLastCommentsViewData() = viewModelScope.launch { 408 433 val data = loadLastCommentsViewData() 409 434 lastComments.set(data) 410 - if (data.isEmpty()) flipLastCommentsChooser.set(false) 411 435 } 412 436 413 437 private suspend fun loadLastCommentsViewData(): List<ViewHolderType> {
+8 -5
features/feature_change_record_type/src/main/java/com/example/util/simpletimetracker/feature_change_record_type/view/ChangeRecordTypeFragment.kt
··· 304 304 chooserArrow = arrowChangeRecordTypeCategory 305 305 ) 306 306 307 - inputChangeRecordTypeName.isVisible = state.current is Closed 308 - containerChangeRecordTypeGoalTime.isVisible = state.current is Closed 309 - fieldChangeRecordTypeColor.isVisible = state.current is Closed || state.current is Color 310 - fieldChangeRecordTypeIcon.isVisible = state.current is Closed || state.current is Icon 311 - fieldChangeRecordTypeCategory.isVisible = state.current is Closed || state.current is Category 307 + val isClosed = state.current is Closed 308 + inputChangeRecordTypeName.isVisible = isClosed 309 + containerChangeRecordTypeGoalTime.isVisible = isClosed 310 + 311 + // Chooser fields 312 + fieldChangeRecordTypeColor.isVisible = isClosed || state.current is Color 313 + fieldChangeRecordTypeIcon.isVisible = isClosed || state.current is Icon 314 + fieldChangeRecordTypeCategory.isVisible = isClosed || state.current is Category 312 315 } 313 316 314 317 private inline fun <reified T : ChangeRecordTypeChooserState.State> updateChooser(
-1
features/feature_change_record_type/src/main/java/com/example/util/simpletimetracker/feature_change_record_type/viewModel/ChangeRecordTypeViewModel.kt
··· 383 383 newState: ChangeRecordTypeChooserState.State, 384 384 ) { 385 385 val current = chooserState.value?.current ?: ChangeRecordTypeChooserState.State.Closed 386 - 387 386 keyboardVisibility.set(false) 388 387 if (current == newState) { 389 388 chooserState.set(