From 67c958f93b668edcd654d7af72f9e86a030ecc78 Mon Sep 17 00:00:00 2001 From: ViscousPotential Date: Fri, 6 Sep 2024 21:46:20 +0100 Subject: [PATCH] fix: improve content accessibilty --- .../com/viscouspot/gitsync/MainActivity.kt | 3 +- app/src/main/res/drawable/input_bg_left.xml | 9 + app/src/main/res/drawable/input_bg_right.xml | 9 + .../res/layout/application_observer_max.xml | 11 +- .../res/layout/application_observer_min.xml | 2 +- app/src/main/res/layout/main_activity.xml | 455 +++++++++--------- app/src/main/res/layout/recent_commit.xml | 32 +- app/src/main/res/values/colors.xml | 2 +- app/src/main/res/values/dimens.xml | 7 +- 9 files changed, 281 insertions(+), 249 deletions(-) create mode 100644 app/src/main/res/drawable/input_bg_left.xml create mode 100644 app/src/main/res/drawable/input_bg_right.xml diff --git a/app/src/main/java/com/viscouspot/gitsync/MainActivity.kt b/app/src/main/java/com/viscouspot/gitsync/MainActivity.kt index f61dbccb..0f0c6bc0 100644 --- a/app/src/main/java/com/viscouspot/gitsync/MainActivity.kt +++ b/app/src/main/java/com/viscouspot/gitsync/MainActivity.kt @@ -11,7 +11,6 @@ import android.graphics.Rect import android.graphics.drawable.Drawable import android.net.Uri import android.os.Bundle -import android.provider.DocumentsContract import android.provider.Settings import android.view.MotionEvent import android.view.View @@ -159,7 +158,7 @@ class MainActivity : AppCompatActivity() { val itemHeight = (viewHolder.itemView.layoutParams as ViewGroup.MarginLayoutParams).topMargin + viewHolder.itemView.measuredHeight - recyclerView.layoutParams.height = itemHeight * 4 + recyclerView.layoutParams.height = itemHeight * 3 recyclerView.requestLayout() } diff --git a/app/src/main/res/drawable/input_bg_left.xml b/app/src/main/res/drawable/input_bg_left.xml new file mode 100644 index 00000000..fc6bf252 --- /dev/null +++ b/app/src/main/res/drawable/input_bg_left.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/input_bg_right.xml b/app/src/main/res/drawable/input_bg_right.xml new file mode 100644 index 00000000..f5b228ca --- /dev/null +++ b/app/src/main/res/drawable/input_bg_right.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/application_observer_max.xml b/app/src/main/res/layout/application_observer_max.xml index f43309fa..6d7145b5 100644 --- a/app/src/main/res/layout/application_observer_max.xml +++ b/app/src/main/res/layout/application_observer_max.xml @@ -8,7 +8,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingHorizontal="@dimen/space_md" - android:paddingVertical="@dimen/space_md" android:theme="@style/Theme.MaterialComponents"> @@ -91,11 +90,11 @@ app:layout_constraintTop_toBottomOf="@id/selectApplication" /> + app:layout_constraintTop_toBottomOf="@id/syncAppOpened" /> \ No newline at end of file diff --git a/app/src/main/res/layout/application_observer_min.xml b/app/src/main/res/layout/application_observer_min.xml index 2dd14cd1..6ced1b72 100644 --- a/app/src/main/res/layout/application_observer_min.xml +++ b/app/src/main/res/layout/application_observer_min.xml @@ -8,11 +8,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingHorizontal="@dimen/space_md" - android:paddingVertical="@dimen/space_md" android:theme="@style/Theme.MaterialComponents"> - + android:fillViewport="true" + android:layout_height="match_parent"> - + + - + - - + - + - + - + - + - + - + - + + + + + + + - - \ No newline at end of file + diff --git a/app/src/main/res/layout/recent_commit.xml b/app/src/main/res/layout/recent_commit.xml index 4c80fdda..9fa28a33 100644 --- a/app/src/main/res/layout/recent_commit.xml +++ b/app/src/main/res/layout/recent_commit.xml @@ -4,9 +4,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:background="@drawable/input_bg_sm" android:backgroundTint="@color/card_secondary_bg" - android:paddingStart="@dimen/space_md" - android:paddingEnd="@dimen/space_sm" - android:paddingVertical="@dimen/space_sm" + android:padding="@dimen/space_sm" android:layout_marginTop="@dimen/space_sm" android:layout_height="wrap_content"> @@ -32,15 +30,15 @@ android:id="@+id/author" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/space_xs" android:text="ViscousPotential" android:textColor="@color/textSecondary" android:textSize="@dimen/text_size_sm" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintTop_toBottomOf="@id/commitMessage" /> + app:layout_constraintTop_toBottomOf="@id/commitMessage" + app:layout_constraintVertical_bias="1.0" /> @@ -110,11 +109,10 @@ android:layout_height="wrap_content" android:text="1,000 --" android:textColor="@color/deletions" - android:textStyle="bold" android:textSize="@dimen/text_size_xs" - android:layout_marginEnd="@dimen/space_xs" - android:layout_marginLeft="@dimen/space_xs" + android:textStyle="bold" + android:layout_marginEnd="@dimen/corner_radius_xs" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintEnd_toEndOf="parent"/> + app:layout_constraintEnd_toEndOf="parent" /> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 8d78b3b7..616d025d 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,7 +1,7 @@ #ffffffff - #898989 + #AAAAAA #00ffffff #131313 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index a262ee5a..0ca133b2 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -11,10 +11,13 @@ 14sp 18sp - 4dp - 8dp + 4dp + 6dp + 8dp + 12dp 16dp 32dp + 48dp 2dp \ No newline at end of file