In my app I use scrollview in main activity to implement fragments. Fragments are called with function in MainActivity.java. Initially scrollview doesn’t have any objects in it and it shows an error “: no speakable text present”(app launches despite an error). I use scrollview because if user tilts phone, he/she wouldn’t be able to see all objects of fragment if fragments are implemented using frameLayout. In my fragment I have multiple textInputLayouts and textViews and button at he bottom. When I tilt phone the app(when main activity with fragment is opened) crashes.
Previosly, I used frameLayout to implement fragments, but frameLayout isn’t scrollable, so I switched to scrollView.