【发布时间】:2014-11-20 17:52:43
【问题描述】:
我有一个 CardScrollView,其中包含列表中的多个项目,我想进一步扩展所选项目并提供更多信息,例如:
- 用户刷卡
- 用户点击侧面(或使用语音)
- 用户从菜单中选择“更多信息”
- (在这部分不确定)使用该卡中的详细信息启动新活动(这些详细信息存储在对象中)
这是我的代码,它在文本视图部分失败(此代码在 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);
【问题讨论】:
标签: android google-glass