getItem vs. getItemAtPosition

android, performance

Solution

You can use which one you want. `getItemAtPosition(position)` basically makes a call to the adapter with `getItem(position)`, it's the same thing.

Problem

There are 2 ways of getting selected Item of a list view. - `list.getAdapter().getItem(position);` - `list.getItemAtPosition(position)` My question is, which one is the preferred way of doing it? I've seen people use both.

Original source