gpt4 book ai didi

java - 我收到 The method onListItemClick(ListView, View, int, long) is undefined for the type ActionBarActivity 错误

转载 作者:行者123 更新时间:2023-12-01 12:36:58 26 4
gpt4 key购买 nike

MainActivity.java:

   public class MainActivity extends ActionBarActivity {
private String[] mPlanetTitles;
private DrawerLayout mDrawerLayout;
private ListView mDrawerList;
.....

.....
protected void onListItemClick(ListView l, View v, int position, long id) {
// TODO Auto-generated method stub
super.onListItemClick(l, v, position, id);

Dastan dastan = dastanha.get(position);// migim dastani ke rush kelik
// shode ro beriz dakhele
// "dastan"
Intent next = new Intent(this, ShowDastan.class);
next.putExtra("thisdastan", dastan);
startActivity(next);// migim ke dastan ro be safhe bad befres

}
.....

图片:http://8pic.ir/images/d6182p5uf5npszbn2aus.jpg

文本错误:ActionBarActivity 类型的方法 onListItemClick(ListView, View, int, long) 未定义

添加抽屉导航时出现问题我该如何解决这个问题?谢谢。

最佳答案

onListItemClick 来自ListActivity

onItemClickListener 定义为其自己的变量并引用它。

关于java - 我收到 The method onListItemClick(ListView, View, int, long) is undefined for the type ActionBarActivity 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25492604/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com