listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Intent intent = new Intent(MainActivity.this, about.class);
switch (position) {
case 0:
intent.putExtra("key", getResource().getString(R.string.tekst1));
break;
case 1:
intent.putExtra("key", getResource().getString(R.string.tekst2));
break ;
case 2:
intent.putExtra("key", getResource ().getString(R.string.tekst3));
break ;
}
startActivity (intent) ;
}
});
Intent intent = getIntent();
Bundle extras = intent.getExtras();
TextView.setText(extras.getString("key"))