Why would you need the same listener if you distinguish logic with ifs? Create separate listeners for each view. It would be cleaner code and should work as well.
// dictionary listener
@Override
public void onItemClick(AdapterView<?> list, View view, int position,
long id) {
Intent intent = new Intent(MainActivity.this, WordActivity.class);
DictionaryListElement ele = (DictionaryListElement) dictionaryList
.getAdapter().getItem(position);
intent.putExtra("word", ele.getWord());
startActivity(intent);
}
// favorites listener
@Override
public void onItemClick(AdapterView<?> list, View view, int position,
long id) {
Intent intent = new Intent(MainActivity.this, WordActivity.class);
String ele = (String)favouritesList.getAdapter().getItem(position);
intent.putExtra("word", ele);
startActivity(intent);
}