F
F
foonfyrick2021-03-20 09:15:25
Android
foonfyrick, 2021-03-20 09:15:25

After changing the screen orientation, the data comes to the logs, but the screen is empty?

The fragment uses a viewager in which a fragment "A" is added, in which there is a listView, it is filled with data, when the screen is rotated, it becomes empty, although the data comes in, I update the adapter.

In each of the methods, I display information about the completion of the method in the logs, all methods work from attaching to destroying the fragment, all data comes in, and the screen is empty.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
foonfyrick, 2021-03-20
@foonfyrick

After installing the adapter I add:
binding.viewPager.offscreenPageLimit = 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question