I have a CardScrollView with several items in the list and I'd like to further expand upon a selected item with more information so for example:
Here is my code and it is failing at the text view part (this code is inside the mainactivity.java
case R.id.settings_3: //More Info
Log.v("Option_selected", "More Info " + jCardScrollView.getSelectedItemPosition());
List<Stuff> stuff = currJobList.getList();
String textDesc = stuff.get(jCardScrollView.getSelectedItemPosition()).getStuffDesc();
TextView view = (TextView) findViewById(R.id.init_text);
view.setText(textDesc); // add the description text into new activity
// launch the activity
Intent infoIntent = new Intent(this,MoreInfoActivity.class);
startActivity(infoIntent);
You should insert the description textView in the new activity in onCreate non before it's opened. You can send the textDesc String through activity with
infoIntent.putExtra("textDesc", textDesc);
and retrieve it in the new activity with
Bundle extras = getIntent().getExtras();
String desc=(String) extras.getString("textDesc");