我要开始新的活动,当我在ListView的内容点击 [英] I want to start new Activity when i click on ListView's content
问题描述
ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,int position, long id) {
Intent i = new Intent(this, contents.class);
startActivityForResult(i, 1);
但是,当我点击的ListView遇到连接错误。告诉我哪里错了????
But when i click on ListView it encounters en error. Tell me where i m wrong????
推荐答案
您需要学习如何在Eclipse中调试和如何使用的 ADB 和 DDMS 工具。
You need to learn how to Debug in Eclipse and how to use the ADB and DDMS tools.
为了获得有关异常/力更多的细节接近,你需要寻找Eclipse的一个观点叫做的 logcat的(你会发现在的 DDMS 观点)那里,你会发现一个详细的追踪时,/什么和什么线路的问题。
In order to get more details about an exception/force close you need to look for a view in Eclipse called Logcat(you will find in the DDMS perspective) there you will find a detailed traceback when/what and on what line is the issue.
有关这个你应该阅读有关Android的调试一个完整的文章使用Eclipse
For this you should read a complete article about Debugging in Android using Eclipse
这篇关于我要开始新的活动,当我在ListView的内容点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!