refracter the src of MainFrament, let gridview and Gallery show the same function whereas pass the different parameters