android - bindView and newView for two view layout in CursorAdapter
问题 So here's the story: I want to use two layouts in my adapter. So basically, I need to have an if in the newView() to determine which view to return and and an if in bindView() to know as well what to do in the view. Is this the right approach? I'm thinking of something like this: @Override public View newView(Context context, Cursor c, ViewGroup parent) { if (HEADER == getItemViewType(c.getPosition())){ return (View) layoutInflater.inflate(R.layout.my_header, null); } else { return (View)