I can not configure the second activation to extract data from the first activation
It is necessary in the second activation to extract the corresponding text from:
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { switch (position) { case 0: Intent intent = new Intent(MainActivity.this, about.class); intent.putExtra("key1", R.string.tekst1); startActivity(intent); case 1: Intent intent1 = new Intent(MainActivity.this, about.class); intent2.putExtra("key1", R.string.tekst2); startActivity(intent1); case 2: Intent intent2 = new Intent(MainActivity.this, about.class); inten2t.putExtra("key1", R.string.tekst3); startActivity(intent2); } } }); how to extract them help
R.string.tekst1is a number (of typeint). By the way, you inswitchlost allbreak. - s8amstartActivity()outside the switch-case block, and creating anIntentinstance before the switch-case block in order to optimize the reduction of duplicate code. - pavlofff