Comments (5)
This is caused by ImeOptions. We don't have many screens that implement that, but the focus should be on the ones that set IME_ACTION_NEXT(pin creation) because they likely try to automove to next edittext, while the softkeyboard is still showing.
See https://stackoverflow.com/a/47991577/11396524
from oppia-android.
I'm having some trouble reproducing this bug, can anyone assist? This is what I've investigated so far:
My understanding of how the bug can be reproduced is as follows:
Given a TextInputEditText with imeOptions set to actionNext
Given another view below it that is not focusable, not visible, or disabled
When a user focuses on TextInputEditText, bringing up the soft keyboard, and presses the '|->' action button in the bottom right corner of the keyboard
Then the exception is thrown since the system attempts to jump to the other view which cannot be focused
Based on a code search query android:imeOptions="actionNext", I've identified 4 potential activities where this bug can take place:
-
I didn't find anything suspect in the profile reset PIN and admin PIN activities, and they seem configured properly (each screen has two TextInputEditTexts; the one on top of the other has the "actionNext" attribute, and the one directly below it has "actionDone"). There also doesn't seem to be a way to make a view unfocusable on these activities.
-
I suspected Add profile activity would be the culprit because there's a checkbox that sets the visibility of two TextInputEditText fields, but I wasn't able to reproduce the error with these steps (on Android 14 emulator):
-
The enter PIN password activity seems to be misconfigured as the screen contains a single TextInputEditText view, but the imeOption is still set to "actionNext." However, there doesn't seem to be any side effect of this either, and I can't reproduce the bug here.
Any next steps from here? I'm new to Android development, so I'm not sure what else I should be looking for to get a reproduction.
from oppia-android.
@elin4046, thanks for looking into this. Some reasons why a view may not be focussable are:
Non-focusable Views: The view you are trying to focus on is not focusable. This can happen if the view’s focusable attribute is set to false or if the view is not focusable in touch mode.
- View is Invisible or Gone: If the view is not currently visible (View.GONE or View.INVISIBLE), it cannot receive focus.
- View is Disabled: A view that is disabled (View.setEnabled(false)) cannot receive focus.
- View Not in Focusable Layout: The view is not within a focusable layout, or the layout itself is not focusable.
- Parent View Issues: The parent view of the view you are trying to focus on is not focusable, or there is an issue with the focus properties of the parent view.
- Focus Order Issues: There might be a problem with the focus order, especially if you are dynamically adding views to the layout and setting focus.
- Race Conditions: If you are trying to set focus before the view hierarchy is fully laid out, it can cause this exception. This can often be resolved by ensuring that focus is set at an appropriate time, such as after the layout pass.
Given that you have already investigated the first 3, and I tried looking a bit into Focus Order Issues, it maybe one of the other two. But those are situational and would be really difficult to reproduce, e.g if a device is low on storage or memory, then the app might slow down/freeze.
This indicates that this issue would rarely occur, and we can put off trying to fix it for now. If however, we receive more crash reports, then we can investigate further.
Would you like to select another issue, or would you like me to assign you something else?
from oppia-android.
Hi @adhiamboperes, thanks for the info, makes sense to depriortize this effort then. You can assign this issue to me, #4312, and I'll take a stab at it
from oppia-android.
Related Issues (20)
- [BUG]: Bazel tests won't run on develop CI HOT 1
- [Feature Request]: Move download script from private Oppia assets repository to this repository
- [enhancement]: Migrate codebase to jetpack compose HOT 3
- [Feature Request]: Remove Kotlin Android extensions HOT 1
- [BUG]: Flaky Test: testLoggingInterceptor_makeNetworkCall_succeeds HOT 5
- [BUG]: Todo Checks Should Check Exclusively Against Issues
- [BUG]: False Positives on Activity/Fragment LocalTests HOT 1
- [BUG]: Accessibility checks causing Espresso test run failures HOT 2
- [Feature Request]: Change ProfileId defaulting to be an invalid profile
- [BUG]: Play Console warns about unspecified mutability in PendingIntents HOT 2
- [Feature Request]: Introduce mechanisms to ensure newly created feature flags are logged
- [BUG]: android.content.res.Resources$NotFoundException - Unable to find resource ID #<address> HOT 1
- [BUG]: cT.D - lateinit property profileId has not been initialized HOT 3
- [BUG]: java.lang.UnsupportedOperationException - Can't convert value at index 4 to dimension: type=<address> HOT 1
- [BUG]: java.lang.IllegalStateException - Media player has not been previously initialized HOT 1
- [BUG]: java.lang.IllegalArgumentException - org.oppia.android: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. HOT 2
- [BUG]: The app crashes occasionally when the device is rotated during exploration. HOT 5
- [BUG]: Unable to run the lesson download script.
- [Feature Request]: Provide instructions for updating the app's target API level and verifying compatibility.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oppia-android.