set adapter in fragment : <p>Getting this error: <a href="https://i.stack.imgur.com/HGf21.png" rel="nofollow"><img src="https://i.stack.imgur.com/HGf21.png" alt="enter image description here"></a> 
I am trying to show gridview in fragment but this error occurs while i am setting the adapter .</p>

<p>My fragment is like this:</p>

<pre><code>public class ExploreFragment extends Fragment {


GridView gv;
Context context;
ArrayList prgmName;
public static String [] prgmNameList={"Adventure","Animals","Automotive","Foods","Diy","Business","Technology","Creative Art","Entertainment"};
public static int [] prgmImages={R.drawable.adventure,R.drawable.animals,R.drawable.automobiles,R.drawable.food_and_drinks,R.drawable.diy,R.drawable.business,R.drawable.technology,R.drawable.creativity,R.drawable.entertainment};

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    return super.onCreateView(inflater, container, savedInstanceState);
    View view = inflater.inflate(R.layout.fragment_explore,container,false);
    gv=(GridView) view.findViewById(R.id.fragment_explore_gridView1);
    gv.setAdapter(new CustomAdapter((MainActivity) getContext().getApplicationContext(),prgmNameList,prgmImages));
}
</code></pre>

<p>Please correct me here.</p>
