diff --git a/app/src/main/java/in/geekofia/blog/fragments/PostsFragment.java b/app/src/main/java/in/geekofia/blog/fragments/PostsFragment.java index b15e6f6..6457174 100644 --- a/app/src/main/java/in/geekofia/blog/fragments/PostsFragment.java +++ b/app/src/main/java/in/geekofia/blog/fragments/PostsFragment.java @@ -101,7 +101,8 @@ public void onItemClick(int position) { @Override public void onShareClick(int position) { - View viewMore = mRecyclerView.getChildAt(position).findViewById(R.id.post_more); + RecyclerView.ViewHolder viewMoreHolder = mRecyclerView.findViewHolderForLayoutPosition(position); + View viewMore = viewMoreHolder.itemView.findViewById(R.id.post_more); showPopup(getActivity(), viewMore, posts, position); } });