我在listview中显示项目,当我点击列表导航到下一个活动但是当我在列表视图中向下滚动然后点击列表时它不工作意味着列表没有点击我非常想知道为什么会发生这种情况..pls一些人帮助我 谢谢。 我的代码..在列表视图中显示是...
class MyAdapter extends BaseAdapter implements OnClickListener
{
private LayoutInflater inflater;
public MyAdapter(Context ctx) {
super();
this.inflater = (LayoutInflater) ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public int getCount() {
return totalartist;
}
/* Not implemented but not really needed */
@Override
public Object getItem(int position) {
return null;
}
/* Not implemented but not really needed */
@Override
public long getItemId(int position) {
return 0;
}
@Override
public View getView(int position, View ConvertView, ViewGroup parent)
{
View v = inflater.inflate(R.layout.listitem_layout, parent, false);
// Log.i("array galoijewdh..",keywordresulttab.array_galleryname[position]);
// Variables.a=3;
try{
String gallerynames = keywordsearch.array_galleryname[position];
String addresses = keywordsearch.array_address[position];
TextView tv = (TextView) v.findViewById(R.id.barrio);
tv.setText(gallerynames);
tv = (TextView) v.findViewById(R.id.ciudad);
tv.setText(addresses);
((BaseAdapter)(getListAdapter())).notifyDataSetChanged();
// return v;
}catch(NullPointerException e){}
return v;
}
@Override
public void onClick(DialogInterface dialog, int which)
{
}
}
}