мое первое действие: (я передаю строку [] через намерение )
Код: Выделить всё
Bundle bundle= new Bundle();
bundle.putStringArray("item_details", new String[]{item_name, item_desc, item_date, item_loc});
Intent intent = new Intent(getApplicationContext(), DataProductDetail.class);
intent.putExtras(extras);
< /code>
[b] мое второе действие: < /strong> (получение string [] < /code>) < /p>
Bundle bundle = this.getIntent().getExtras();
String[] itemArray = bundle.getStringArray("item_details");
ArrayAdapter itemArrayAdapter = new ArrayAdapter(this, R.layout.list_item, itemArray );
ListView list = (ListView)findViewById(R.id.list);
detailsList.setAdapter(itemArrayAdapter );
< /code>
макет list_item < /strong>: < /p>
< /code>
Мой вопрос /проблема: < /strong> < /p>
Я хочу, чтобы мой первый экран в приложении выглядел так (что работает): < /p>
item1
item2
item3
The second screen when item1 is clicked in the first Activity should be like this (not sure how to get this, above code doesn't work):
Код: Выделить всё
Name: xyz is "item_name" from array "itemArray" received from intent
Description: This is the description from "item_desc" from array "itemArray"
Date: This is the date string grabbed from item_date from array "itemArray"
< /code>
Как я могу получить такой макет, как показано на втором экране выше? Я хочу, чтобы имя, описание, дату Подробнее здесь: https://stackoverflow.com/questions/247 ... d-activity
Мобильная версия