Answer the question
In order to leave comments, you need to log in
Wrong position of the Spinner?
Actually the problem itself is shown on the screen
:
https://yadi.sk/i/ntKCWBC5sJQtd
There is an ExpandableListView, in it in one child of the first group there is a text field, in another child of the other group there is a couple of spinners. If you try to open the spinner at the start of the activity, then everything is in order, the spinner opens in the desired position. But, if you first tap into the text field (so that the virtual keyboard is called), hide it and then tap into the spinner, then the list itself does not drop out in the place of the spinner, but in the upper left corner of the screen. And this behavior is repeated until some element of the spinner is selected.
Shamanism with forced closing of the keyboard and removal of focus from the input field when tapping on the spinner did not help.
The activity context is passed to the spinner adapter as the context.
Who can help?
Answer the question
In order to leave comments, you need to log in
In general, the solution was found by itself. There were two non-obvious moments in the code:
1) The child groups of the ExpandableListView were cached
2) The creation of the ComboBox required the creation of a child (which was cached) at a stage when there were no groups as such - in the onCreate activity.
After redoing these two things, the problem disappeared by itself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question