i m following the helloGallery tu开发者_运维问答torial but i would like to open the image when i click it instead of present a toast with the position of the image...any help?this is my code,that presents the position:
g.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
Toast.makeText(HelloGallery.this, "" + position, Toast.LENGTH_SHORT).show();
}
});
This tutorial shows how to do what you're looking for: http://www.androidpeople.com/android-gallery-imageview-example/
精彩评论