With this piece of code I can show the images in the gallery in my activity
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.message_main);
Intent photoPickerIntent = new Intent(Intent.ACTION_GET_CONTENT);
photoPickerIntent.setType("image/*");
startActivityForResult(photoPickerIntent, 1);
}
the layout looks like this
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
</RelativeLayout>
What I don't know how to do is wire up a long click to an image? So when a user long click the image in my actiivy I want to capture which image was clicked and process it. Find it's path, type of image etc. Based on my layout I"m not sure what I would wire up to capture this long click?