diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b1ddbb..01d085bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -92,7 +92,7 @@ released versions... proGuard dependency issue.) Fix problem with hang if the computation of the book size hasn't finished before the book is started. -## Version 1.1.3 (pending release) +## Version 1.1.3 Fix a number of accessibility issues and some potential crashes shown by automatic testing. diff --git a/app/build.gradle b/app/build.gradle index be6f518f..e2f1510a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -70,7 +70,7 @@ android { multiDexEnabled true minSdkVersion 17 targetSdkVersion 29 - versionCode 6 + versionCode 7 versionName getVersionName() } buildTypes { diff --git a/app/src/main/java/com/donnKey/aesopPlayer/ui/provisioning/TitleEditFragment.java b/app/src/main/java/com/donnKey/aesopPlayer/ui/provisioning/TitleEditFragment.java index 558d7bbf..7a773434 100644 --- a/app/src/main/java/com/donnKey/aesopPlayer/ui/provisioning/TitleEditFragment.java +++ b/app/src/main/java/com/donnKey/aesopPlayer/ui/provisioning/TitleEditFragment.java @@ -141,15 +141,12 @@ else if (provisioning.fragmentParameter instanceof AudioBook) { normalizeButton.setOnClickListener((v) -> finalTitle.setText(AudioBook.titleCase(Objects.requireNonNull(finalTitle.getText()).toString()))); - addAuthorButton.setEnabled(author.getText() != null); - addAuthorButton.setOnClickListener((v) -> { - String a = author.getText().toString(); - if (a.length() > 0) { - String s = Objects.requireNonNull(finalTitle.getText()).toString(); - s += " - " + a; - finalTitle.setText(s); - } - }); + if (author.getText() != null) { + addAuthorButton.setEnabled(true); + author.setEnabled(true); + author.setOnClickListener((v) -> doAddAuthor(author)); + addAuthorButton.setOnClickListener((v) -> doAddAuthor(author)); + } doneButton.setOnClickListener((v) -> { String s = Objects.requireNonNull(finalTitle.getText()).toString(); @@ -199,6 +196,16 @@ else if (provisioning.fragmentParameter instanceof AudioBook) { return view; } + private void doAddAuthor(TextView author) { + String a = author.getText().toString(); + if (a.length() > 0) { + String s = Objects.requireNonNull(finalTitle.getText()).toString(); + s += " - " + a; + finalTitle.setText(s); + } + } + + class inputFilter implements TextWatcher { boolean textChanged; diff --git a/app/src/main/res/layout/fragment_book_item.xml b/app/src/main/res/layout/fragment_book_item.xml index aa569a84..9ea6e9f8 100644 --- a/app/src/main/res/layout/fragment_book_item.xml +++ b/app/src/main/res/layout/fragment_book_item.xml @@ -41,7 +41,7 @@ app:layout_constraintDimensionRatio="1" app:layout_constraintEnd_toStartOf="@id/copyBooksInstruction" app:layout_constraintHorizontal_chainStyle="spread_inside" - app:layout_constraintHorizontal_weight="15" + app:layout_constraintHorizontal_weight="18" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="?attr/startSettingsIcon" /> @@ -80,7 +80,7 @@ app:layout_constraintDimensionRatio="1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_chainStyle="spread_inside" - app:layout_constraintHorizontal_weight="15" + app:layout_constraintHorizontal_weight="18" app:layout_constraintStart_toEndOf="@id/copyBooksInstruction" app:layout_constraintTop_toTopOf="parent"> @@ -200,6 +200,7 @@ android:layout_height="match_parent" android:background="@color/transparent" android:gravity="center_vertical|center" + android:importantForAccessibility="no" android:text="@string/button_start" android:textAllCaps="true" android:textColor="?attr/buttonStartTextColor" diff --git a/app/src/main/res/layout/fragment_no_books.xml b/app/src/main/res/layout/fragment_no_books.xml index e30a0948..33ad99f8 100644 --- a/app/src/main/res/layout/fragment_no_books.xml +++ b/app/src/main/res/layout/fragment_no_books.xml @@ -46,7 +46,7 @@ app:layout_constraintDimensionRatio="1" app:layout_constraintEnd_toStartOf="@id/h_spacer" app:layout_constraintHorizontal_chainStyle="spread_inside" - app:layout_constraintHorizontal_weight="15" + app:layout_constraintHorizontal_weight="18" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" app:srcCompat="@drawable/ic_settings_black_24dp" /> @@ -85,7 +85,7 @@ app:layout_constraintDimensionRatio="1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_chainStyle="spread_inside" - app:layout_constraintHorizontal_weight="15" + app:layout_constraintHorizontal_weight="18" app:layout_constraintStart_toEndOf="@id/h_spacer" app:layout_constraintTop_toTopOf="parent"> @@ -121,7 +121,7 @@ app:layout_constraintBottom_toTopOf="@id/downloadSamplesButton" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/h_spacer" + app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_chainStyle="spread_inside" app:layout_constraintVertical_weight="0" /> @@ -138,7 +138,7 @@ app:layout_constraintStart_toEndOf="@id/h_space2" app:layout_constraintTop_toBottomOf="@id/space1" app:layout_constraintVertical_chainStyle="spread_inside" - app:layout_constraintVertical_weight="30" /> + app:layout_constraintVertical_weight="35" /> + app:layout_constraintVertical_weight="15" />