apps-android-commons/app
Jason-Whitmore 730f314200
Some checks failed
Android CI / Run tests and generate APK (push) Has been cancelled
Fixes Issue #6384: java.lang.NullPointerException in ReviewActivity (#6394)
* 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.

* ReviewActivity.kt: simplify info icon code to work with some languages

Before this commit, if the language was set to a language that is read right to left,
pressing the info icon would crash the app with a NPE. This was because the Kotlin
code assumed that the icon would always be on the right of the skip button
(index 2 in the drawable array). When a right to left language was used, the icon
would be on the left and index 2 would be null.

This commit builds upon prior GUI changes. The info icon now has its own button.
Kotlin changes now remove the use of the drawable array to find the info icon and
instead directly references the new info icon button. The info icon button now works
properly for both left-to-right and right-to-left languages while maintaining correct
positioning.

* activity_review.xml: fix xml to be more readable

This commit moves around some lines in the XML to make it more readable.

* activity_review.xml: change button configuration

This change simplifies the button configuration XML and makes the info icon button slightly smaller

---------

Co-authored-by: Ritika Pahwa <83745993+RitikaPahwa4444@users.noreply.github.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2025-09-05 15:36:47 +09:00
..
src Fixes Issue #6384: java.lang.NullPointerException in ReviewActivity (#6394) 2025-09-05 15:36:47 +09:00
build.gradle.kts Bump up version code and name for the patch release (v6.0.1) 2025-08-30 12:34:47 +05:30
proguard-rules.txt Fix/file usage not working (#6354) 2025-06-24 21:56:00 +09:00
test-proguard-rules.txt Update to API 28, and fix CI issues. (#2595) 2019-03-15 08:30:08 +05:30