Code example for ViewSwitcher

Methods: getDisplayedChild, showNext

0
        } 
         
    } 
 
    public void updateGrid() { 
        if (viewSwitch.getDisplayedChild() == 0)
            viewSwitch.showNext();
        resultGridView.setAdapter(new GoogleImagesAdapter());
    } 
     
    class GoogleImagesAdapter extends BaseAdapter {
 
        @Override 
        public int getCount() { 
            return myList.size();
        } 
 
        @Override 
        public Object getItem(int arg0) {
            return myList.get(arg0);
        }