I have an activity with a ViewPager that contains three fragments
public class Hello extends extends FragmentActivity
...
adapterViewPager.addFragment(new FRG_one());
adapterViewPager.addFragment(new FRG_two());
adapterViewPager.addFragment(new FRG_three());
adapterViewPager.addFragment(new FRG_four());
...
Within the activity, I have a button that when pressed I want to do one action or another, depending on the fragment that is being displayed on the screen
I found ways to detect if a fragment is visible, but do not serve me.
What I need is that the activity that contains the viewpager (extends FragmentActivity) detects fragment has focus
I appreciate the help
regards :)