This repository has been archived by the owner on May 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Can't find fragment by tag #2
Labels
Comments
Also, getPage can be called with an index that is out of bounds.
|
private static String makeFragmentName(int viewId, long id) {
return "android:switcher:" + viewId + ":" + id;
} I don't see how it could break in the near future; unless there will be some drastic changes in the Android API... Although, I guess it'll make more sense to get a fragment reference via
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When setting a
OnSliderStateChangeListener
and using a FragemtnPagerAdapter,getView()
is puking because no fragment is being returned by id. Relying on internal API code such as"android:switcher:" + R.id.internal_pager_id + ":" + position
is fragile and will break. Is theView
object really necessary for theOnSliderStateChangeListener
? It seems like position could suffice and maybe just makegetPage
public instead?The text was updated successfully, but these errors were encountered: