I know how to create a custom listview in android. But like in iPhone application development we can set multiple different uicellview styles for each row. Is it possible in android if yes how can we achive this. Your help will be appreciated
2 Answers
use the position of the item in your getView method.
Pseudo:
public View getView(int position, View recycledView, ViewGroup group) {
View view;
if(position == 1){
view = View.inflate(context, R.layout.view1, null);
} else {
view = View.inflate(context, R.layout.view2, null);
}
// populate the view
return view;
}