I had a similar problem and it was solved in the Fragment onViewCreated () callback as follows:
@Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); view.post(new Runnable() { @Override public void run() {
run () is started after all views are displayed ...
Andrey
source share