Skip to content

Commit

Permalink
fix: improve content accessibilty
Browse files Browse the repository at this point in the history
  • Loading branch information
ViscousPot committed Sep 15, 2024
1 parent 381f058 commit 67c958f
Show file tree
Hide file tree
Showing 9 changed files with 281 additions and 249 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/com/viscouspot/gitsync/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/input_bg_left.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/textPrimary" />
<corners
android:bottomLeftRadius="@dimen/corner_radius_md"
android:bottomRightRadius="@dimen/corner_radius_sm"
android:topLeftRadius="@dimen/corner_radius_md"
android:topRightRadius="@dimen/corner_radius_sm"/>
</shape>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/input_bg_right.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="@color/textPrimary" />
<corners
android:bottomLeftRadius="@dimen/corner_radius_sm"
android:bottomRightRadius="@dimen/corner_radius_md"
android:topLeftRadius="@dimen/corner_radius_sm"
android:topRightRadius="@dimen/corner_radius_md"/>
</shape>
11 changes: 5 additions & 6 deletions app/src/main/res/layout/application_observer_max.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
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">

<Switch
style="@style/Switch"
android:id="@+id/enableApplicationObserver"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingVertical="@dimen/space_md"
android:layout_marginStart="@dimen/space_sm"
android:checked="true"
android:enabled="true"
Expand All @@ -32,7 +32,6 @@
android:visibility="invisible"
android:enabled="false"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_md"
android:paddingVertical="@dimen/space_sm"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/enableApplicationObserver"/>
Expand Down Expand Up @@ -91,11 +90,11 @@
app:layout_constraintTop_toBottomOf="@id/selectApplication" />

<Switch
style="@style/Switch"
android:id="@+id/syncAppClosed"
style="@style/Switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/space_md"
android:layout_marginVertical="@dimen/space_md"
android:background="@drawable/input_bg_md"
android:backgroundTint="@color/card_secondary_bg"
android:checked="true"
Expand All @@ -104,8 +103,8 @@
android:paddingVertical="@dimen/space_sm"
android:text="@string/sync_on_app_closed"
android:textSize="@dimen/text_size_md"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/syncAppOpened"
/>
app:layout_constraintTop_toBottomOf="@id/syncAppOpened" />

</androidx.constraintlayout.widget.ConstraintLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/application_observer_min.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<Switch
style="@style/Switch"
android:paddingVertical="@dimen/space_md"
android:id="@+id/enableApplicationObserver"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
Loading

0 comments on commit 67c958f

Please sign in to comment.