shareButton=(Button) findViewById(R.id.shareBtn);
shareButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
/*Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, title);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, title));*/
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "特惠价格:"+famous_mit.getProductPrice()+"元 "+"http://"); //附带的说明信息
intent.putExtra(Intent.EXTRA_SUBJECT, famous_mit.getProductName());
startActivity(Intent.createChooser(intent,"分享"));
}
});
shareButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
/*Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, title);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, title));*/
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "特惠价格:"+famous_mit.getProductPrice()+"元 "+"http://"); //附带的说明信息
intent.putExtra(Intent.EXTRA_SUBJECT, famous_mit.getProductName());
startActivity(Intent.createChooser(intent,"分享"));
}
});