Hi! I sometimes get bug reports with the following...
# android
g
Hi! I sometimes get bug reports with the following stack trace:
Copy code
java.lang.IllegalArgumentException · parameter must be a descendant of this view
ViewGroup.java:7024 android.view.ViewGroup.offsetRectBetweenParentAndChild	
ViewGroup.java:6946 android.view.ViewGroup.offsetDescendantRectToMyCoords	
NestedScrollView.java:1445 androidx.core.widget.NestedScrollView.isWithinDeltaOfScreen	
NestedScrollView.java:1999 androidx.core.widget.NestedScrollView.onSizeChanged	
View.java:23959 android.view.View.sizeChange	
View.java:23892 android.view.View.setFrame	
View.java:23751 android.view.View.layout	
ViewGroup.java:7277 android.view.ViewGroup.layout	
LinearLayout.java:1829 android.widget.LinearLayout.setChildFrame	
LinearLayout.java:1673 android.widget.LinearLayout.layoutVertical	
LinearLayout.java:1582 android.widget.LinearLayout.onLayout	
View.java:23754 android.view.View.layout	
ViewGroup.java:7277 android.view.ViewGroup.layout
I have never been able to reproduce it so I have no idea where it is coming from. It always happen from the same screen. The screen is mostly composed of several fields that the user has to fill up. Most of those fields are
EditText
but the users don't fill them directly. When they press on an EditText, a new activity is opened with a list os several items they can choose from once the select an item that new activity is closed, the user is sent back the form activity and the EditText is automatically filled in with the name of the item selected. The error seems to often happen after selecting a couple of items this way. that's what I can see from the logs but I haven't find a way to reproduce it. It is only happening to some users and not all the time. Mostly happening on Samsung devices but I recently say some reports from pixel devices. Any idea what could go wrong or how I could get more info to try to reproduce it?
😶 4
a
How to reproduce? Your EditText has focus, you then scroll till the point the EditText is off the screen, and it wasn't recycled to a new EditText that is now shown
Possible fix - remove focus from edittext every time user scroll
g
I found several sources saying that the focus was the issue but I hvae never been able to reproduce it. All my EditText have
Copy code
android:focusable="false"
android:focusableInTouchMode="false"
l
hey, Have you been able to fix this?
147 Views