-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-добавлена кнопка назад и диалог на неё в таймер -исправлен баг, когда состоняие вьюмодели не менялось после дестроя фрагмента -изменены парамерты editText в опциях -исправлен баг с крашем приложение при вводе пустой строки в опции -добавлен голый topAppBar -добавлен переход в таймер и изенена логика для таймера(работает) -добавлен альтернативный лэйаут для портреного режима таймера Tasks: -добавить экран настроек (язык и темная тема) -добавить переход на экран настроек -добавить скролабл поведение на appBar, чтобы он уезжал когда ты крутишь ресайкл вниз -удалить лишние вью с главного (титул старый и кнопку настроек старую) - изменить поведение крестиков на editText в опциях с цифрами, надо чтобы они уходили, когда фокус не на окне - сдвинуть ближе кнопки в опциях, но чтобы сохранился эффек смены - настроить цвета в таймере -настроить обработку ошибок ввода более точечно в опциях -сделать по кнопке назад(добавить) из таймера отключение таймера -почистить код от мусора(старого кода, лишних картинок, стрингов и тд) -сделать выбор при нажатии назад(отменить тренировку или нет) поменять кнопку старт на главной с старт на котинью
- Loading branch information
Showing
17 changed files
with
269 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<solid android:color="@color/main_app_color_super_soft"/> | ||
<solid android:color="@color/light_blue"/> | ||
<corners android:radius="20dp" /> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/constraint_layout" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
tools:context=".fragments.WorkoutFragment"> | ||
|
||
<ImageButton | ||
android:id="@+id/back_button" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="24dp" | ||
android:layout_marginTop="24dp" | ||
android:background="?android:attr/selectableItemBackgroundBorderless" | ||
android:src="@drawable/ic_arrow_back" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<androidx.recyclerview.widget.RecyclerView | ||
android:id="@+id/recycler_view" | ||
android:layout_width="match_parent" | ||
android:layout_height="64dp" | ||
android:orientation="horizontal" | ||
app:layout_constraintBottom_toTopOf="@id/local_timer_view" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/back_button" /> | ||
|
||
<TextView | ||
android:layout_marginStart="48dp" | ||
android:id="@+id/local_timer_view" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:ellipsize="start" | ||
android:gravity="center" | ||
android:singleLine="true" | ||
android:text="@string/default_total_time" | ||
android:textAlignment="center" | ||
android:textColor="@color/hard_grey" | ||
android:textSize="75sp" | ||
android:textStyle="bold" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/general_timer_view" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_marginBottom="60dp" | ||
android:text="@string/default_total_time" | ||
android:textAlignment="center" | ||
android:textSize="30sp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" /> | ||
|
||
<TextView | ||
android:id="@+id/total_time_title" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginStart="6dp" | ||
android:ellipsize="end" | ||
android:lines="1" | ||
android:text="@string/total_time_title" | ||
android:textColor="@color/grey" | ||
android:textSize="15sp" | ||
app:layout_constraintBaseline_toBaselineOf="@id/general_timer_view" | ||
app:layout_constraintBottom_toBottomOf="@+id/general_timer_view" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toEndOf="@id/general_timer_view" /> | ||
|
||
<Button | ||
android:id="@+id/start_button" | ||
style="@style/GeneralRedButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/start_button" | ||
|
||
app:layout_constraintBottom_toBottomOf="@+id/local_timer_view" | ||
app:layout_constraintStart_toEndOf="@id/local_timer_view" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/local_timer_view" /> | ||
|
||
<Button | ||
android:id="@+id/pause_button" | ||
style="@style/GeneralRedButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/pause_button" | ||
android:visibility="invisible" | ||
|
||
app:layout_constraintBottom_toBottomOf="@+id/local_timer_view" | ||
app:layout_constraintStart_toEndOf="@id/local_timer_view" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/local_timer_view" /> | ||
|
||
<Button | ||
android:id="@+id/restart_button" | ||
style="@style/Widget.Material3.Button.OutlinedButton" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:backgroundTint="@color/white" | ||
android:text="@string/restart_button" | ||
android:textColor="@color/dark_blue" | ||
android:textSize="18sp" | ||
android:visibility="invisible" | ||
app:layout_constraintBottom_toBottomOf="@+id/local_timer_view" | ||
app:layout_constraintStart_toEndOf="@id/local_timer_view" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintTop_toTopOf="@id/local_timer_view" | ||
app:strokeColor="@color/dark_blue" /> | ||
|
||
|
||
<com.google.android.material.progressindicator.LinearProgressIndicator | ||
android:id="@+id/global_progress_indicator" | ||
android:layout_width="match_parent" | ||
android:layout_height="50dp" | ||
android:layout_margin="20dp" | ||
android:contentDescription="@string/progress_indicator" | ||
app:indicatorColor="@color/dark_blue" | ||
app:indicatorDirectionLinear="startToEnd" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/general_timer_view" | ||
app:trackColor="@color/light_blue" | ||
app:trackCornerRadius="8dp" | ||
app:trackThickness="10dp" /> | ||
|
||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.