【发布时间】:2015-03-10 13:05:12
【问题描述】:
我的代码:
String[] category = {"CA", "Tax consultant", "MR", "Dance trainer"};
ListAdapter categoryAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, category);
ListView categoryListView = (ListView) findViewById(R.id.categoryListView);
categoryListView.setAdapter(categoryAdapter);
单击单个项目时我要写什么来更改活动。甚至告诉我在新活动中我要写什么?
【问题讨论】:
-
当列表视图的任何项目被点击时你想打开相同的活动吗?
-
谷歌任何基本的 ListView 教程(在提问之前)。您需要实现 onItemClicked 方法。
-
@apurva : 没有不同的活动。
标签: android listview android-intent