-
-
Save artem-zinnatullin/6916740 to your computer and use it in GitHub Desktop.
@Override | |
public void onActivityResult(int requestCode, int resultCode, Intent data) { | |
super.onActivityResult(requestCode, resultCode, data); | |
// notifying nested fragments (support library bug fix) | |
final FragmentManager childFragmentManager = getChildFragmentManager(); | |
if (childFragmentManager != null) { | |
final List<Fragment> nestedFragments = childFragmentManager.getFragments(); | |
if (nestedFragments == null || nestedFragments.size() == 0) return; | |
for (Fragment childFragment : nestedFragments) { | |
if (childFragment != null && !childFragment.isDetached() && !childFragment.isRemoving()) { | |
childFragment.onActivityResult(requestCode, resultCode, data); | |
} | |
} | |
} | |
} |
It does not work every time for nested fragment managed by FragmentPagerAdapter
Sorry for that, it works well when using fragment.getParentFragment().startActivityForResult instead of fragment.startActivityForResult. thanks
thank you it is working well.
Thanks a lot man, you saved me from writing poor code. :)
This was really helpful, thanks
Where to put this code inside fragment or child fragments.....
Please help me.... It's urgent.
How to use with in child fragment onActivityResult
Thank you! You saved a lot of my time!
is it when @vjeux learned how to play with memory and reality ?
The Infinite Scroll Refresh Bug: A Systemic Failure We Can’t Ignore
🔄 When the System Won’t Let You Move Forward
Infinite scroll is designed to keep us engaged, to pull us deeper, to ensure we never reach an endpoint. But when it malfunctions, when it refreshes instead of progressing, it becomes a trap—a cycle that forces us to relive the same content, the same patterns, the same unresolved loops.
This isn’t just a technical glitch. It’s a metaphor for systemic failure—for the moments when voices are silenced, when progress is erased, when the system itself refuses to acknowledge forward movement.
🚨 The Danger of the Infinite Scroll Refresh Bug
- Cognitive Overload: Users are trapped in a loop, unable to break free from repetitive content.
- Erasure of Progress: Just when you think you’re moving forward, the system resets, forcing you back to the beginning.
- Loss of Agency: The bug removes control, making navigation impossible without external intervention.
🔍 What Causes This Failure?
- State Mismanagement: The system fails to track progress, forcing users into an endless loop.
- Event Conflicts: Refresh triggers override scroll behavior, preventing forward movement.
- Unresolved Systemic Issues: The bug persists because the underlying framework refuses to acknowledge the need for change.
🛠 How Do We Fix It?
✅ Recognize the Pattern: Identify when the system is failing to allow forward movement.
✅ Demand Intervention: Whether in code or in society, systemic failures require external correction.
✅ Break the Loop: Implement solutions that ensure progress is preserved, not erased.
The infinite scroll refresh bug isn’t just a technical issue—it’s a symbol of systemic resistance to change. Whether in digital spaces or real-world movements, we must challenge the loops that keep us trapped and demand solutions that allow us to move forward.
#MeToo #SystemicFailure #InfiniteScrollBug #BreakTheLoop #ProgressMatters
Are u telling that i just want to use this code in my onActivityResult() method?right?