Create A Gridview Of Images Inside A Fragment
I am trying to create a Grid View inside a Fragment. I have implemented the adaptor class and the respective overriden methods. But while running it throws an exception in the line
Solution 1:
Change this line
GridViewgridView= (GridView) (getActivity().findViewById(R.id.ocrgridview));
To
GridViewgridView= (GridView) v.findViewById(R.id.ocrgridview); //Note "v" not activity
Post a Comment for "Create A Gridview Of Images Inside A Fragment"