Hey ihr mal mein Code
Code
public class NextActivity extends AppCompatActivity {
private TextView tv;
private Button bestellen;
private int i;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_next);
tv = (TextView) findViewById(R.id.tv);
for (int i = 0; i < CustomAdapter.imageModelArrayList.size(); i++){
if(CustomAdapter.imageModelArrayList.get(i).getSelected()) {
tv.setText(tv.getText() + " " + CustomAdapter.imageModelArrayList.get(i).getAnimal()+ "\n") ;
}
}
bestellen = (Button) findViewById(R.id.bestellen);
}
public void bestellen_onClick(View view) {
Intent intent=new Intent(Intent.ACTION_SEND);
String[] to={"[email protected]"};
intent.putExtra(Intent.EXTRA_EMAIL,to);
intent.putExtra(Intent.EXTRA_SUBJECT,"Hey hier ist meine Bestellung aus der App");
intent.putExtra(Intent.EXTRA_TEXT,"Hier hätte ich gern den Inhalt des TextViews");
intent.putExtra(Intent.EXTRA_PROCESS_TEXT,i);
intent.setType("message/rfc822");
Intent chooser = Intent.createChooser(intent, "Send Email");
startActivity(chooser);
}
}
Alles anzeigen