I haven’t seen this on the Android docs. Is it safe to use this automatically generated tag to refer to the fragments inside a viewPager?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would not recommend it, as that is private data internal to the
PagerAdapterimplementation.You are better served copying the
FragmentPagerAdapterand/orFragmentStatePagerAdaptersource into your project (refactored into your own package). Then, not only will you be insulated from any changes in the naming scheme, but you can even expose the methods used to generate those names.The downside, of course, is that improvements made to those
PagerAdapterimplementations will not be available to you in the future unless you repeat the process.