I am generating a ListView
using a SimpleAdapter
. My SimpleAdapter
code is as follows:
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});
My activity is MainActivity
which extends Activity
.
I want to override
the getview()
method. How can I do that?
Try this,
Instead of calling
new SimpleAdapter
you can call something like thisKeep this class as a subclass in your activity itself,
You can do it this way:
Create class which extends SimpleAdapter and override it's methods. don't forget to handle the constructor and call super(...)