我正在使用ListView
生成SimpleAdapter
。我的代码如下:
ListAdapter k = new SimpleAdapter(this, val1, R.layout.mytask, new String[]{"TaskId", "heading", "status"}, new int[]{R.id.View1, R.id.View2, R.id.ViewStatus});
我的活动是
SimpleAdapter
它MainActivity
。我想要
extends Activity
的override
方法。我该怎么做? 最佳答案
你可以这样做:
ListAdapter k = new SimpleAdapter(...) {
@Override
public View getView (int position, View convertView, ViewGroup parent) {
View view = super.getView(position, convertView, parent);
...
return view;
}
}
关于android - 如何在Android的SimpleAdapter中使用getview()?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22904495/