content: package net.ellerton.japng.android.demo.view;
  
  
  import android.os.Bundle;
  import android.app.Fragment;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.AdapterView;
  import android.widget.ArrayAdapter;
  import android.widget.GridView;
  import android.widget.TextView;
  import android.widget.Toast;
  
  import net.ellerton.japng.android.demo.R;
  
  /**
   * A simple {@link Fragment} subclass.
   */
  public class ViewInfoFragment extends Fragment {
  
  
      public ViewInfoFragment() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                               Bundle savedInstanceState) {
          // Inflate the layout for this fragment
          View rv = inflater.inflate(R.layout.fragment_view_info, container, false);
  
          GridView gridView = (GridView) rv.findViewById(R.id.viewInfoGrid);
  
          ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
                  android.R.layout.simple_list_item_1, numbers);
  
          gridView.setAdapter(adapter);
  
          gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
              public void onItemClick(AdapterView<?> parent, View v,
                                      int position, long id) {
                  Toast.makeText(getActivity(),//getApplicationContext(),
                          ((TextView) v).getText(), Toast.LENGTH_SHORT).show();
              }
          });
  
          return rv;
      }
  
  
      static final String[] numbers = new String[] {
              "A", "B", "C", "D", "E",
              "F", "G", "H", "I", "J",
              "K", "L", "M", "N", "O",
              "P", "Q", "R", "S", "T",
              "U", "V", "W", "X", "Y", "Z"};
  
  
  }
  