Android Question Error when inserting 2 panels on a customlistview (Comparison method violates its general contract!)

Amateurtje

Member
Licensed User
Longtime User
Hi,

I have a Customlistview with some panels on it. on the panels are some textboxes. when inserting (not add) a couple of new panels (2 or 3) and i enter(press) from 1 textbox to another, I get the following message:
B4X:
java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeHi(TimSort.java:899)
    at java.util.TimSort.mergeAt(TimSort.java:516)
    at java.util.TimSort.mergeCollapse(TimSort.java:441)
    at java.util.TimSort.sort(TimSort.java:245)
    at java.util.Arrays.sort(Arrays.java:1492)
    at java.util.ArrayList.sort(ArrayList.java:1470)
    at java.util.Collections.sort(Collections.java:206)
    at android.view.FocusFinder.findNextFocusInRelativeDirection(FocusFinder.java:308)
    at android.view.FocusFinder.findNextFocus(FocusFinder.java:262)
    at android.view.FocusFinder.findNextFocus(FocusFinder.java:110)
    at android.view.FocusFinder.findNextFocus(FocusFinder.java:80)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1050)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.ViewGroup.focusSearch(ViewGroup.java:1052)
    at android.view.View.focusSearch(View.java:12253)
    at android.widget.TextView.onEditorAction(TextView.java:7032)
    at com.android.internal.widget.EditableInputConnection.performEditorAction(EditableInputConnection.java:138)
    at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:357)
    at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:89)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7397)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

I already tried:
B4X:
 Activity.DisableAccessibility(True)

But this only resulted in a complete freeze of the program and not showing the above message anymore....

I am completely stuck.. Please help...
 

DonManfred

Expert
Licensed User
Longtime User
Where is the small example project-upload showing the problem?
 
Upvote 0

Amateurtje

Member
Licensed User
Longtime User
it is a big project.. i will try to reduce it to a small project but it might take some hours work to slice it to the core..i hoped on a insight without having to do that work.. I ll be back..
 
Upvote 0

Amateurtje

Member
Licensed User
Longtime User
when reducing the program I discovered that it must have somthing to do with a part where the tab-order was defined with FOrder. I deleted that part and now it is working.. I can still however, run into wrong tab-order problems.... but it works....why it blocks i will probably never understand and that scares me a little bit....
 
Upvote 0
Top