From 7318c8c273170c50bd4fa2353dec90f6fff63e35 Mon Sep 17 00:00:00 2001 From: Jason Whitmore Date: Wed, 6 Aug 2025 20:11:38 -0700 Subject: [PATCH] activity_review.xml: add new GUI elements to replace old ones Before this commit, the info icon shared the same GUI element with the "Skip this image" text. This made the Kotlin code to handle taps on the info icon difficult to write, and would crash with a NPE when the user used a language that is read right to left and the info icon was pressed. This commit creates new GUI elements. Notably, the info icon has it's own element. A LinearLayout is used to place the skip button and the info icon button together. Kotlin code can now be simplified and the NPE bug can be fixed. --- app/src/main/res/layout/activity_review.xml | 44 ++++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/layout/activity_review.xml b/app/src/main/res/layout/activity_review.xml index 871d25c7d..02bc56736 100644 --- a/app/src/main/res/layout/activity_review.xml +++ b/app/src/main/res/layout/activity_review.xml @@ -24,23 +24,37 @@ android:id="@+id/toolbarBinding" layout="@layout/toolbar" /> - - + android:orientation="horizontal" + android:gravity="center"> + + + + + +