app/src/main/java/com/example/android/popularmoviesapp/PostersFragment.java
@Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

                selectedPosition = position;

                // onItemSelected is overridden in MainActivity
                ((Callback) getActivity()).onItemSelected(id);
            }
/**
             * Enter detail activity upon clicking on the item in the list
             *
             * @param parent the AdapterView where the click happened
             * @param view the view within the AdapterView that was clicked
             *             (this will be a view provided by the adapter)
             * @param position the position of the cursor in the adapter
             * @param id the cursor id of the item that was clicked. In this case it is the movie._ID
             */
Enter detail activity upon clicking on the item in the list
@param parent the AdapterView where the click happened
@param view the view within the AdapterView that was clicked
(this will be a view provided by the adapter)
@param position the position of the cursor in the adapter
@param id the cursor id of the item that was clicked. In this case it is the movie._ID
Enter detail activity upon clicking on the item in the list @param parent the AdapterView where the click happened @param view the view within the AdapterView that was clicked ( this will be a view provided by the adapter ) @param position the position of the cursor in the adapter @param id the cursor id of the item that was clicked . In this case it is the movie . _ID
@Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                selectedPosition = position;
                ((Callback) getActivity()).onItemSelected(id);
            }
@ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { selectedPosition = position ; ( ( Callback ) getActivity ( ) ) . onItemSelected ( id ) ; }
Enter detail activity upon clicking on the item in the list
 @param parent the AdapterView where the click happened
 @param view the view within the AdapterView that was clicked
             (this will be a view provided by the adapter)
 @param position the position of the cursor in the adapter
 @param id the cursor id of the item that was clicked.
Enter detail activity upon clicking on the item in the list @param parent the AdapterView where the click happened @param view the view within the AdapterView that was clicked ( this will be a view provided by the adapter ) @param position the position of the cursor in the adapter @param id the cursor id of the item that was clicked .
// onItemSelected is overridden in MainActivity