I have an Activity "A" with a ViewPager (with TabLayout) inside. The viewPager includes 2 fragments "X" and "Y", since ViewPager handles the lifecycle of the fragments. When the activity is on resume, the fragments also go to resume.
When I launch the activity initially, the first tab - "X" fragment is in focus and displays the UI, during this I am getting a soft keyboard. (This keyboard is launched by spawning a mainUIThread with a delay of 1.5secs during the onResume of the "Y" fragment).
The question is, why does the onResume of "Y" fragment interfere while the "X" fragment's tab during onResume ? Is there a way to avoid it ?
I want to show the keyboard only for the "Y" fragment and not for the "X" fragment. Since the "Y" frament's onResume handles the keyboard somehow the keyboard gets visible.