Button button = (Button) this.findViewById(R.id.huangliao);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
String value = String.valueOf(Environment.getExternalStorageDirectory()+"/DCIM/Camera");
File file = new File(value);
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "image/*");
startActivity(intent);
}
});
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
String value = String.valueOf(Environment.getExternalStorageDirectory()+"/DCIM/Camera");
File file = new File(value);
Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "image/*");
startActivity(intent);
}
});