package com.example.TreballFiGrau;



import android.app.Activity;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.Toast;

import com.squareup.picasso.Picasso;
 
/**
 *
 * @author danielme.com
 *
 */
public class MostrarFotosNoticia extends Activity {
 
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.galeria_fotos);

	    GridView gridview = (GridView) findViewById(R.id.gridview);
	    gridview.setAdapter(new GalleryAdapter(this));

	    gridview.setOnItemClickListener(new OnItemClickListener() {
	        public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
	            Toast.makeText(MostrarFotosNoticia.this, "" + position, Toast.LENGTH_SHORT).show();
	        }
	    });
	}
}