Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(Capture-sdk)PP-688 : Talk back issues #648

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ View onCreateView(final LayoutInflater inflater, final ViewGroup container,
mUserAnalyticsEventTracker = UserAnalytics.INSTANCE.getAnalyticsEventTracker();

bindViews(view);
setContentDescriptions();
preventPaneClickThrough();
setCustomLoadingIndicator();
setInputHandlers();
Expand Down Expand Up @@ -751,6 +752,17 @@ private void bindViews(final View view) {
}
}

private void setContentDescriptions() {
final Activity activity = mFragment.getActivity();
if (activity == null) {
return;
}

if (mPhotoThumbnail != null) {
mPhotoThumbnail.setContentDescriptionThumbnail(activity.getString(R.string.gc_photo_review_content_description));
}
}

private void preventPaneClickThrough() {
mPaneWrapper.setEnabled(false);
mPaneWrapper.setOnClickListener(v -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public void setImageCount(final int count) {
badge.setVisibility(count > 0 ? VISIBLE : INVISIBLE);
}

public void setContentDescriptionThumbnail(String contentDescription) {
thumbnail.setContentDescription(contentDescription);
}

public void removeImage() {
removeClickListener(thumbnail);
resetImageView(thumbnail);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:id="@+id/gc_injected_navigation_bar_container_top"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -32,6 +33,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_alignParentTop="true"
android:focusable="true"
android:orientation="horizontal"
android:layout_marginTop="@dimen/gc_large"
android:minHeight="@dimen/gc_large_42"
Expand Down Expand Up @@ -63,6 +65,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="@dimen/gc_large_24"
android:focusable="true"
android:textColor="@color/gc_dark_06"
android:text="@string/gc_error_upload_text"
android:layout_marginStart="@dimen/gc_large_48"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/gc_large"
android:layout_marginTop="@dimen/gc_large"
android:focusable="true"
app:layout_constraintStart_toStartOf="@+id/gc_no_results_recyclerview"
app:layout_constraintTop_toBottomOf="@+id/view3"
tools:text="@string/gc_useful_tips" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:id="@+id/gc_injected_navigation_bar_container_top"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -33,6 +34,7 @@
app:layout_constraintEnd_toEndOf="parent"
android:layout_alignParentTop="true"
android:orientation="horizontal"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large"
android:minHeight="@dimen/gc_large_42"
android:paddingStart="@dimen/gc_large_48"
Expand Down Expand Up @@ -62,6 +64,7 @@
style="@style/GiniCaptureTheme.Typography.Body2"
android:layout_width="0dp"
android:layout_height="0dp"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large_24"
android:textColor="@color/gc_dark_06"
android:text="@string/gc_error_upload_text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:id="@+id/gc_navigation_top_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -34,6 +35,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_alignParentTop="true"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large"
android:minHeight="@dimen/gc_large_64"
android:paddingStart="@dimen/gc_large_24"
Expand Down Expand Up @@ -64,6 +66,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/gc_large"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large"
app:layout_constraintStart_toStartOf="@+id/gc_no_results_recyclerview"
app:layout_constraintTop_toBottomOf="@+id/view2"
Expand Down
3 changes: 3 additions & 0 deletions capture-sdk/sdk/src/main/res/layout/gc_fragment_error.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<net.gini.android.capture.view.InjectedViewContainer
android:id="@+id/gc_injected_navigation_bar_container_top"
android:layout_width="0dp"
android:focusable="true"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -31,6 +32,7 @@
app:layout_constraintTop_toBottomOf="@id/gc_injected_navigation_bar_container_top"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:focusable="true"
android:layout_alignParentTop="true"
android:layout_marginTop="@dimen/gc_large_24"
android:minHeight="@dimen/gc_large_64"
Expand Down Expand Up @@ -62,6 +64,7 @@
style="@style/GiniCaptureTheme.Typography.Body2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large"
android:textColor="?attr/gcErrorScreenSubtitle"
android:text="@string/gc_error_upload_text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
android:focusable="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -34,6 +35,7 @@
android:layout_marginStart="@dimen/gc_large_24"
android:layout_marginEnd="@dimen/gc_large_24"
android:layout_marginBottom="@dimen/gc_large"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large_24"
android:gravity="center"
android:text="@string/gc_payment_details_visible"
Expand Down
2 changes: 2 additions & 0 deletions capture-sdk/sdk/src/main/res/layout/gc_fragment_noresults.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
android:id="@+id/gc_navigation_top_bar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:focusable="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -32,6 +33,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_alignParentTop="true"
android:focusable="true"
android:layout_marginTop="@dimen/gc_large"
android:minHeight="@dimen/gc_large_64"
android:paddingStart="@dimen/gc_large_24"
Expand Down
1 change: 1 addition & 0 deletions capture-sdk/sdk/src/main/res/layout/gc_item_tip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:focusable="true"
android:background="?attr/colorSurface"
android:minHeight="@dimen/gc_photo_tips_row_min_height">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
android:layout_marginStart="@dimen/gc_large"
android:layout_marginTop="@dimen/gc_medium"
android:layout_marginEnd="@dimen/gc_large"
android:focusable="true"
android:layout_marginBottom="@dimen/gc_large"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
1 change: 1 addition & 0 deletions capture-sdk/sdk/src/main/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<string name="gc_scan">Scan</string>
<string name="gc_take_a_picture">Take a picture</string>
<string name="gc_flash_button">Flash</string>
<string name="gc_photo_review_content_description">Photo review</string>
<string name="gc_delete_page">Delete page</string>
<string name="gc_document_page">Document page</string>
<string name="gc_useful_tips">Useful tips</string>
Expand Down
1 change: 1 addition & 0 deletions capture-sdk/sdk/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
<string name="gc_scan">Aufnahme</string>
<string name="gc_take_a_picture">Foto schießen</string>
<string name="gc_flash_button">Blitz</string>
<string name="gc_photo_review_content_description">Foto vorschaubild</string>
<string name="gc_delete_page">Seite löschen</string>
<string name="gc_document_page">Dokumentenseite</string>
<string name="gc_useful_tips">Nützliche Tipps</string>
Expand Down
Loading