Android ListView with different layouts for each row
问题 I am trying to determine the best way to have a single ListView that contains different layouts for each row. I know how to create a custom row + custom array adapter to support a custom row for the entire list view, but how can I implement many different row styles in the ListView? 回答1: Since you know how many types of layout you would have - it's possible to use those methods. getViewTypeCount() - this methods returns information how many types of rows do you have in your list