I have a view with several fragments, I added a floating button to get print from the screen, but I would like to know how to differentiate each fragment to put different names in the photos.
I have the code below, which takes the photo but overlaps the next ones because it has the same name.
@OnClick(R.id.fab_client_screenshot)
public void printScreen() {
String fileName = "foto.png";
JUtil.saveScreenShot(mViewPager.getRootView(), fileName);
}