I have customized my ListAdapter and i show 3 different Images (items) in 1 row. It works perfectly (according to it's function). However, it's not possible to scroll the ListView smoothly.
I am using setBackgroundImage on ImageViews and i use an HashMap to cache resourceId; so i don't have to use
resId=getContext().getResources().getIdentifier(resName, "drawable",appContext.getPackageName());
again and again.
I think i am missing something as the ListView is not scrolling well. Also if i try it on a tablet where my code automatically fills more than 3 items on a row, tablet's listview is almost unscrollable.
What am i doing wrong here?
UPDATE:
I create ListView programmatically in my Flags (country flags) Activity's onCreate method:
root=(ViewGroup)this.findViewById(R.id.root);
listView=new ListView(this);
listView.setLayoutParams(new LayoutParams(
LayoutParams.MATCH_PARENT,
LayoutParams.MATCH_PARENT));
/*
ArrayList<Country> dataList=new ArrayList<Country>(){{
add(new Country("jp"));
add(new Country("de"));
add(new Country("it"));
}};*/
CountryListAdapter countryListAdapter=new CountryListAdapter(this);
countryListAdapter.setDataSource(allCountries);
listView.setAdapter(regionListAdapter);
listView.setBackgroundColor(0xFF000000);
listView.setDividerHeight(0);
root.addView(listView);