refactor: Update layout for FitnessActivity

This commit updates the layout for the FitnessActivity by making the following changes:
- Adjusted the width of the LinearLayout to wrap its content
- Added padding to the LinearLayout and its child views
- Updated the dimensions of the VideoView and PersonalMotionPreviewElement

These changes improve the visual presentation and alignment of the elements in the FitnessActivity layout.
This commit is contained in:
SebasKoedam
2024-05-30 16:32:10 +02:00
parent fa48f71407
commit 985d0b5219
2 changed files with 66 additions and 26 deletions

View File

@@ -1,42 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/darkBlue"
android:fitsSystemWindows="true"
tools:context=".ui.activities.FitnessActivity"
tools:openDrawer="start">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/darkBlue"
android:fitsSystemWindows="true"
tools:context=".ui.activities.FitnessActivity"
tools:openDrawer="start">
<LinearLayout
android:layout_width="900dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginStart="30dp"
android:layout_marginTop="30dp"
android:layout_marginEnd="30dp"
android:padding="15dp"
android:background="@drawable/help2_background"
android:orientation="horizontal"
android:padding="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.505"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<VideoView
android:id="@+id/videoView"
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginStart="20dp"
/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginRight="20dp"
android:background="@drawable/help2_background"
android:orientation="horizontal"
android:padding="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.example.fitbot.ui.components.PersonalMotionPreviewElement
android:id="@+id/personalMotionPreviewElement"
android:layout_width="400dp"
android:layout_height="400dp"
android:layout_marginStart="20dp"
/>
<VideoView
android:id="@+id/videoView"
android:layout_width="350dp"
android:layout_height="350dp"
android:layout_gravity="center"
android:layout_margin="2dp" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="20dp"
android:background="@drawable/help2_background"
android:orientation="horizontal"
android:padding="20dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.example.fitbot.ui.components.PersonalMotionPreviewElement
android:id="@+id/personalMotionPreviewElement"
android:layout_width="350dp"
android:layout_height="350dp" />
</LinearLayout>
</LinearLayout>
@@ -44,7 +69,7 @@ tools:openDrawer="start">
android:id="@+id/homeButtonFitness"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="404dp"
android:layout_marginStart="200dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
@@ -54,4 +79,18 @@ tools:openDrawer="start">
app:layout_constraintStart_toStartOf="parent"
tools:ignore="SpeakableTextPresentCheck" />
<Button
android:id="@+id/homeButtonFitness3"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginEnd="200dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
android:padding="15dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:ignore="SpeakableTextPresentCheck" />
</android.support.constraint.ConstraintLayout>

View File

@@ -31,4 +31,5 @@
<item name= "android:textStyle">bold</item>
<item name="android:padding">6dp</item>
</style>
</resources>