MDRams

Untitled

Apr 3rd, 2016
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. case R.id.sharelist:
  2.  
  3.  
  4.  
  5. String result = finallist.toString().replace("[", "").replace("]", "").replace(",", "");
  6.  
  7. Intent shareIntent = new Intent(Intent.ACTION_SEND);
  8.  
  9. shareIntent.setType("text/plain");
  10.  
  11. shareIntent.putExtra(Intent.EXTRA_SUBJECT,
  12. "This is your list");
  13.  
  14. shareIntent.putExtra(Intent.EXTRA_TEXT, result);
  15.  
  16. startActivity(Intent.createChooser(shareIntent, "Choose how to share your list"));
  17. viewIsAtHome = false;
  18.  
  19.  
  20. break;
Advertisement
Add Comment
Please, Sign In to add comment