Storing a reference to the parent activity isn't recommended. If direct communication with the PostsActivity is necessary and a callback won't cut it, relying on a helper routine like this is safer:
```
private PostsActivity getPostsActivity() {
        if (getActivity() instanceof PostsActivity)
            return (PostsActivity) getActivity();
        return null;
    }
```