Inter-fragment communication applied to Nested Fragments?

It turns out there is a getParentFragment() method introduced to cater to nested fragments. It is available on android.app.Fragment from API 17, but can be used on older versions using android.support.v4.app.Fragment.

I can’t believe I overlooked this API!

EDIT:

I came across this gist that makes this process of figuring out the parent component (whether Fragment or Activity) easy, elegant and safe!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)