I use four fragment in mainactivity and each has it's class with mainactivity class.
I have elements in fragment1 class, when I create them inside onCreateView method they are creating each time when I open the fragment.
I tried to create elements in onStart method in fragment class, nothing changes. I tried to create elements in onCreate method in fragment class, it stops the app.
When I create the elements in onCreate, onStart method in MainActivity, it stops the app.
So, basically I want to create element only once, and when app start they has to be created.
How can I solve this problem? Thanks for help.