package csu.matos.actionBar;

import android.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout.LayoutParams;
import android.widget.RelativeLayout;

public class Fragment3 extends Fragment {
	
	private Integer selectedRow;	
	
	Integer[] largeImages = { 
			R.drawable.pic01_large, R.drawable.pic02_large, R.drawable.pic03_large, 
			R.drawable.pic04_large, R.drawable.pic05_large, R.drawable.pic06_large,
			R.drawable.pic07_large, R.drawable.pic08_large, R.drawable.pic09_large,
			R.drawable.pic10_large, R.drawable.pic11_large, R.drawable.pic12_large,
			R.drawable.pic13_large, R.drawable.pic14_large, R.drawable.pic15_large };

	public Fragment3(Integer selectedRow) {
		super();
		this.selectedRow = selectedRow;
	}
	
	// this UI is entirely created by code
	@Override
	public View onCreateView(LayoutInflater inflater, 
			ViewGroup container,
			Bundle savedInstanceState) {
		
		ImageView image = new ImageView(getActivity());
		image.setLayoutParams(new RelativeLayout.LayoutParams(
				LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
		image.setBackgroundResource( largeImages[selectedRow] );
		return image;
	}
}
