image.setOnClickListener(new OnClickListener(){

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch(simage){
case R.drawable.pad_detail_email:
Intent i
= new Intent(Intent.ACTION_SEND);
i.setType(
"message/rfc822") ;
i.putExtra(Intent.EXTRA_EMAIL,
new String[]{content.getText().toString()});
i.putExtra(Intent.EXTRA_SUBJECT,
"");
i.putExtra(Intent.EXTRA_TEXT,
"");
startActivity(Intent.createChooser(i,
"Select email application."));
break;
case R.drawable.pad_detail_web:
Uri uri
= Uri.parse("http://"+content.getText().toString());
Intent it
= new Intent(Intent.ACTION_VIEW, uri);
//it.setType(type)
//startActivity(Intent.createChooser(it,"Selete broswe application."));
startActivity(it);
break;
case R.drawable.pad_detail_gps:
Uri u
= Uri.parse("http://maps.google.com/maps?q="+ content.getText().toString());
Intent ite
= new Intent(Intent.ACTION_VIEW, u);
startActivity(ite);
break;
default:
break;
}
}

  

posted on 2011-08-16 15:01  榆钱沽酒  阅读(332)  评论(0编辑  收藏  举报