package app.hima.activity.tools;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.support.v4.app.Fragment;

public class ImageSelect implements OnClickListener {
	private Fragment activity;
	private int id;
	
	

	public ImageSelect(Fragment frag, int id) {
		super();
		this.activity = frag;
		this.id = id;
	}



	@Override
	public void onClick(View v) {
		Intent photoPickerIntent = new Intent();
		photoPickerIntent.setType("image/*");
		photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);
		photoPickerIntent.addCategory(Intent.CATEGORY_OPENABLE);
		activity.startActivityForResult(photoPickerIntent, id);

	}

}
