Code example for Gallery

Methods: setSelection

0
    mListView.setOnItemClickListener(new OnItemClickListener() {
 
      @Override 
      public void onItemClick(AdapterView<?> parent, View view,
          int position, long id) {
        mGallery.setSelection(position - 1, true);
      } 
    }); 
  } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE