Skip to content

Commit

Permalink
Minor UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NikM3 committed Apr 22, 2023
1 parent 2ab7d09 commit 0f15359
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Created by Team Symphony on 4/20/23, 2:11 AM
* Created by Team Symphony on 4/21/23, 10:36 PM
* Copyright (c) 2023 . All rights reserved.
* Last modified 4/20/23, 2:11 AM
* Last modified 4/21/23, 10:36 PM
*/

package com.symphony.mrfit.ui
Expand Down Expand Up @@ -134,16 +134,15 @@ class CurrentWorkoutActivity : AppCompatActivity() {
.inflate(R.layout.activity_post_workout, null, false)

materialDialog.setView(dialogView)
.setTitle("Post Exercise")

val text = dialogView.findViewById<TextView>(R.id.postWorkoutTime)
val startTime = SimpleDateFormat(
"'You started this workout at' hh:mm a",
"'You started this workout at 'hh:mm a",
Locale.getDefault()
)
.format(Date().time - timeSpent)
val endTime = SimpleDateFormat(
"' and finished at ' hh:mm a",
"' and finished at 'hh:mm a",
Locale.getDefault()
)
.format(Date())
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Created by Team Symphony on 4/21/23, 10:18 PM
* Created by Team Symphony on 4/21/23, 10:36 PM
* Copyright (c) 2023 . All rights reserved.
* Last modified 4/21/23, 9:57 PM
* Last modified 4/21/23, 10:26 PM
*/

package com.symphony.mrfit.ui
Expand Down Expand Up @@ -108,11 +108,13 @@ class WorkoutRoutineActivity : AppCompatActivity() {
routinePlaylist.setText(BLANK)
}
if (routine.workoutList != null) {
spinner.visibility = View.VISIBLE
placeholderText.visibility = View.GONE
workoutList.visibility = View.VISIBLE
passedList = routine.workoutList
exerciseViewModel.getWorkouts(routine.workoutList)
if (routine.workoutList.isNotEmpty()) {
spinner.visibility = View.VISIBLE
placeholderText.visibility = View.GONE
workoutList.visibility = View.VISIBLE
passedList = routine.workoutList
exerciseViewModel.getWorkouts(routine.workoutList)
}
}
})
exerciseViewModel.workoutList.observe(this, Observer {
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/res/layout/activity_post_workout.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Created by Team Symphony on 4/20/23, 2:11 AM
~ Created by Team Symphony on 4/21/23, 10:36 PM
~ Copyright (c) 2023 . All rights reserved.
~ Last modified 4/20/23, 2:11 AM
~ Last modified 4/21/23, 10:36 PM
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down Expand Up @@ -39,7 +39,6 @@
android:gravity="center"
android:maxLines="2"
android:text="Good job!"
android:textColor="#000000"
android:textSize="24sp" />

<TextView
Expand Down
17 changes: 11 additions & 6 deletions app/src/main/res/layout/activity_workout_routine.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Created by Team Symphony on 4/21/23, 10:18 PM
~ Created by Team Symphony on 4/21/23, 10:36 PM
~ Copyright (c) 2023 . All rights reserved.
~ Last modified 4/21/23, 9:24 PM
~ Last modified 4/21/23, 10:27 PM
-->

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
Expand Down Expand Up @@ -42,10 +42,12 @@
android:layout_marginTop="10dp"
android:ems="10"
android:hint="@string/label_routine_name"
android:importantForAutofill="no"
android:inputType="textPersonName"
android:minHeight="48dp"
android:importantForAutofill="no"
android:textAlignment="center" />
android:textAlignment="center"
android:textColor="@color/black"
android:textColorHint="@color/black" />

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -56,15 +58,18 @@
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1">
android:layout_weight="1"
android:textColorHint="@color/material_dynamic_neutral40">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/workoutPlaylistEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:hint="@string/workout_playlist" />
android:hint="@string/workout_playlist"
android:textColor="@color/black"
android:textColorHint="@color/black" />
</com.google.android.material.textfield.TextInputLayout>

<Button
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/res/layout/card_history.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Created by Team Symphony on 4/21/23, 5:28 PM
~ Created by Team Symphony on 4/21/23, 10:36 PM
~ Copyright (c) 2023 . All rights reserved.
~ Last modified 4/21/23, 5:17 PM
~ Last modified 4/21/23, 10:27 PM
-->

<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
Expand All @@ -26,7 +26,6 @@ will add padding in API v21+ as well to have the same measurements with previous
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/border_thick"
android:gravity="center">

<TextView
Expand All @@ -36,7 +35,6 @@ will add padding in API v21+ as well to have the same measurements with previous
android:layout_margin="10dp"
android:layout_weight="1"
android:text="@string/PLACEHOLDER_TEXT"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold" />

Expand Down

0 comments on commit 0f15359

Please sign in to comment.