安卓ListView问题如何实现点击一行,跳转到另一个activity
像这样随意点一行后,如何跳到下一个界面,是让每一行对应不同的activity可以做到吗ArrayAdapter<CharSequence>adapter=ArrayAda...
像这样随意点一行后,如何跳到下一个界面,是让每一行对应不同的activity 可以做到吗
ArrayAdapter<CharSequence>adapter=ArrayAdapter.createFromResource(this, R.array.tut_titles,
android.R.layout.simple_list_item_checked);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String result = parent.getItemAtPosition(position).toString();
}
});然后咋写嘞 展开
ArrayAdapter<CharSequence>adapter=ArrayAdapter.createFromResource(this, R.array.tut_titles,
android.R.layout.simple_list_item_checked);
listView.setAdapter(adapter);
listView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String result = parent.getItemAtPosition(position).toString();
}
});然后咋写嘞 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询