Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ArrayList<Object> objectList = new ArrayList<>();
- if(objectList.get(position) instanceof ModelA){
- //TODo your ModelA operations
- }else if (objectList.get(position) instanceof ModelB){
- //TODo your ModelB operations
- }else if (objectList.get(position) instanceof ModelC){
- //TODo your ModelC operations
- }
Add Comment
Please, Sign In to add comment