Android Image not loaded in Custom Adapter - android

I am having list of my Facebook friends and i created a list View that's having separator as months from Jan to Dec.
I am able list my friends details, My problem is that i am able to show their Name and birthday date if i try load their "PICTURES" i can't do it..
It showing me the icon set as Background in XML.
Even the URL for the image to be load is get printed in Log, but i cant get the image..
Here is my code
private class MyCustomAdapter extends BaseAdapter {
private static final int TYPE_ITEM = 0;
private static final int TYPE_SEPARATOR = 1;
private static final int TYPE_MAX_COUNT = TYPE_SEPARATOR + 1;
private LayoutInflater mInflater;
private TreeSet<Integer> mSeparatorsSet = new TreeSet<Integer>();
public MyCustomAdapter() {
mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mData = new ArrayList<Category>();
}
public void addItem(final Category item) {
mData.add(item);
notifyDataSetChanged();
}
public void addSeparatorItem(final Category item) {
mData.add(item);
// save separator position
mSeparatorsSet.add(mData.size() - 1);
notifyDataSetChanged();
}
#Override
public int getItemViewType(int position) {
return mSeparatorsSet.contains(position) ? TYPE_SEPARATOR : TYPE_ITEM;
}
#Override
public int getViewTypeCount() {
return TYPE_MAX_COUNT;
}
#Override
public int getCount() {
return mData.size();
}
#Override
public Category getItem(int position) {
return mData.get(position);
}
#Override
public long getItemId(int position) {
return position;
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
int type = getItemViewType(position);
System.out.println("getView " + position + " " + convertView + " type = " + type);
Category category = mData.get(position);
holder = new ViewHolder();
if (convertView == null) {
switch (type) {
case TYPE_ITEM:
convertView = mInflater.inflate(R.layout.item1, null);
holder.textView = (TextView)convertView.findViewById(R.id.text);
holder.textView1 = (TextView)convertView.findViewById(R.id.text1);
holder.icon = (ImageView) convertView.findViewById(R.id.friend_photo);
break;
case TYPE_SEPARATOR:
convertView = mInflater.inflate(R.layout.item2, null);
holder.textView = (TextView)convertView.findViewById(R.id.textSeparator);
break;
}
convertView.setTag(holder);
} else {
if(type==TYPE_ITEM){
holder.textView = (TextView)convertView.findViewById(R.id.text);
holder.textView1 = (TextView)convertView.findViewById(R.id.text1);
holder.icon = (ImageView) convertView.findViewById(R.id.friend_photo);
holder = (ViewHolder)convertView.getTag();
}else{
holder.textView = (TextView)convertView.findViewById(R.id.textSeparator);
holder = (ViewHolder)convertView.getTag();
}
}
if(type==TYPE_SEPARATOR){
holder.textView.setText(mData.get(position).dealTitle);
}else{
holder.textView.setText(mData.get(position).dealTitle);
holder.textView1.setText(mData.get(position).dealDesc);
holder.icon.setTag(mData.get(position).picture);
}
return convertView;
}
}

You need to set your ImageView's bitmap using one of the setImageFoo() calls.
setImageResource()
setImageBitmap()
setImageDrawable()

I'm not sure what type of object mData.get(position).picture is but
holder.icon.setTag(mData.get(position).picture);
isn't loading the picture. That's just setting some data on the View.
You need to use one of the setImage() methods of ImageView.

Your code looks fine, there might be a problem with the xml/layout file.
As you are loading two textViews and a ImageView from the xml for each item, it is important to know how the layout is organised to show all the added views in it.
Please post the layout files so that, one can suggest if there is any problem.

Related

Custom ListView with checkbox changes position while scrolling in android

I am new to android and working on web view demo, I have implemented it. But the problem with me is when I check any check box and scrolling the list view , The checked position changes.
I have tried some links from stack over flow with no luck, SO I request someone can help me to resolve this issue, please
My adapter is as below,
adapter
public class FilterAdapter extends BaseAdapter {
private static final int TYPE_ITEM = 0;
private static final int TYPE_SEPARATOR = 1;
private static final int TYPE_MAX_COUNT = TYPE_SEPARATOR + 1;
private ArrayList<String> mData = new ArrayList<String>();
private LayoutInflater mInflater;
private TreeSet<Integer> mSeparatorsSet = new TreeSet<Integer>();
public FilterAdapter(Context context) {
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
public void addItem(final String item) {
mData.add(item);
notifyDataSetChanged();
}
public void addSeparatorItem(final String item) {
mData.add(item);
// save separator position
mSeparatorsSet.add(mData.size() - 1);
notifyDataSetChanged();
}
#Override
public int getItemViewType(int position) {
return mSeparatorsSet.contains(position) ? TYPE_SEPARATOR : TYPE_ITEM;
}
#Override
public int getViewTypeCount() {
return TYPE_MAX_COUNT;
}
public int getCount() {
return mData.size();
}
public String getItem(int position) {
return mData.get(position);
}
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
int type = getItemViewType(position);
System.out.println("getView " + position + " " + convertView + " type = " + type);
if (convertView == null) {
holder = new ViewHolder();
switch (type) {
case TYPE_ITEM:
convertView = mInflater.inflate(R.layout.raw_filter, null);
holder.textView = (TextView) convertView.findViewById(R.id.tv_filter);
holder.chk_filter = (CheckBox) convertView.findViewById(R.id.chk_filter);
break;
case TYPE_SEPARATOR:
convertView = mInflater.inflate(R.layout.raw_headr, null);
holder.textView = (TextView) convertView.findViewById(R.id.tv_hdr);
break;
}
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.textView.setText(mData.get(position));
return convertView;
}
}
class ViewHolder {
public TextView textView;
public CheckBox chk_filter;
}
add clickListener in your getView() method, it will fix your set checked box in the entire listView like this:
checkBoxSelected.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
instrumentClickListener.onCheckBoxClick(instrumentDTO, checkBoxSelected.isChecked(), position);
Log.d(TAG, "checked instruments is check: " + checkBoxSelected.isChecked() + " \ninstrument: " + position);
}
});

adding separators in a listView

I'm trying to add separators between my list view items, I have sorted them into date order and added list entries where the separator needs to go but as soon as it gets to a seperator it stops, no error message or anything it just doesn't add the seperator. I've added breakpoints and it definitely runs the code to add it but it doesn't show up. Even if there are other items to add after the separator it still stops at the separator.
code:
#Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater itemInflater = LayoutInflater.from(getContext());
JourneyItem singleItem = list.get(position);
if(singleItem.isSeperator()){
//set customRow to seperator layout
View customRow = itemInflater.inflate(R.layout.journey_list_seperator, parent, false);
TextView monthText = (TextView) customRow.findViewById(R.id.seperatorMonthText);
TextView yearText = (TextView) customRow.findViewById(R.id.seperatorYearText);
Date current = new Date();
SimpleDateFormat df = new SimpleDateFormat("dd/MM/yyyy");
String dtp = GeneralUtil.SQLDateFormatToHuman(list.get(position).getDepartDateTime());
try {
current = df.parse(dtp);
} catch (ParseException e) {
e.printStackTrace();
}
SimpleDateFormat sdfDate = new SimpleDateFormat("MMMM");
monthText.setText(sdfDate.format(current));
yearText.setText(list.get(position).getDepartDateTime().substring(6,10));
return customRow;
}else {
View customRow = itemInflater.inflate(R.layout.custom_journeyitem_row, parent, false);
TextView titleText = (TextView) customRow.findViewById(R.id.titleDisplay);
TextView fromText = (TextView) customRow.findViewById(R.id.fromLocationDisplay);
TextView departText = (TextView) customRow.findViewById(R.id.departDateTimeDisplay);
TextView toText = (TextView) customRow.findViewById(R.id.toLocationDisplay);
TextView colourLbl = (TextView) customRow.findViewById(R.id.colourDisplay);
titleText.setText(singleItem.getTitle());
fromText.setText("From: " + singleItem.getFromLocation());
departText.setText(singleItem.getDepartDateTime());
toText.setText("To: " + singleItem.getToLocation());
colourLbl.setBackgroundColor(singleItem.getColourCode());
return customRow;
}
Create Coustom adapter like this.
class CustomAdapter extends BaseAdapter {
private static final int TYPE_ITEM = 0;
private static final int TYPE_SEPARATOR = 1;
private ArrayList<String> mData = new ArrayList<String>();
private TreeSet<Integer> sectionHeader = new TreeSet<Integer>();
private LayoutInflater mInflater;
public CustomAdapter(Context context) {
mInflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
public void addItem(final String item) {
mData.add(item);
notifyDataSetChanged();
}
public void addSectionHeaderItem(final String item) {
mData.add(item);
sectionHeader.add(mData.size() - 1);
notifyDataSetChanged();
}
#Override
public int getItemViewType(int position) {
return sectionHeader.contains(position) ? TYPE_SEPARATOR : TYPE_ITEM;
}
#Override
public int getViewTypeCount() {
return 2;
}
#Override
public int getCount() {
return mData.size();
}
#Override
public String getItem(int position) {
return mData.get(position);
}
#Override
public long getItemId(int position) {
return position;
}
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
int rowType = getItemViewType(position);
if (convertView == null) {
holder = new ViewHolder();
switch (rowType) {
case TYPE_ITEM:
convertView = mInflater.inflate(R.layout.snippet_item1, null);
holder.textView = (TextView) convertView.findViewById(R.id.text);
break;
case TYPE_SEPARATOR:
convertView = mInflater.inflate(R.layout.snippet_item2, null);
holder.textView = (TextView) convertView.findViewById(R.id.textSeparator);
break;
}
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
holder.textView.setText(mData.get(position));
return convertView;
}
public static class ViewHolder {
public TextView textView;
}
}
Complete link here.

Android, dynamic Listview layout changing on scroll

I have a conversation mode in my application where I wish to load one layout for one user and another layout for the other. It need not always be alternating hence I cannot use a simple "%2" to achieve it.
Based on a flag I am assigning a dynamic layout, which works. My problem is that as I scroll the layouts get distorted as in, conversation of user_1 will get layout_2 or conversation of user_2 will get layout_1, absolutely random.
I did something similar to an answer I saw here:
https://stackoverflow.com/a/16774696/4810718
There were a few posts about randomized data. That is not my issue, the order of the list items does not change however the layout get's randomly applied. I read that the items in view + 1 are kept in temporary memory, regarding this another thing I noticed was: as I keep adding items such that the scrollbar comes into picture when I add a second item outside the visibility it tends to get the layout of the topmost item (first item) visible. Scrolling would later give me seemingly randomized results.
public class ConversationAdapter extends BaseAdapter
{
private LayoutInflater inflater;
private ArrayList<ConversationContent> objects;
ImageView user;
static int ind = 0;
private class ViewHolder
{
TextView textView1;
TextView textView2;
TextView textView3;
}
public ConversationAdapter(Context context, ArrayList<ConversationContent> objects)
{
inflater = LayoutInflater.from(context);
this.objects = objects;
}
public int getCount()
{
return objects.size();
}
public ConversationContent getItem(int position)
{
return objects.get(position);
}
public long getItemId(int position)
{
return position;
}
#Override
public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder = null;
if(convertView == null)
{
holder = new ViewHolder();
if (Main_Page3.convFlag == 1)
{
convertView = inflater.inflate(R.layout.conversation_item_1, null);
}
else
{
convertView = inflater.inflate(R.layout.conversation_item_2, null);
}
holder.textView1 = (TextView) convertView.findViewById(R.id.trans);
holder.textView1.setTypeface(Main_Activity.fontC);
holder.textView2 = (TextView) convertView.findViewById(R.id.lang);
holder.textView2.setTypeface(Main_Activity.fontC);
holder.textView3 = (TextView) convertView.findViewById(R.id.user);
holder.textView3.setTypeface(Main_Activity.fontC);
convertView.setTag(holder);
}
else
{
holder = (ViewHolder) convertView.getTag();
}
holder.textView1.setText(objects.get(position).getTranslatedText());
holder.textView2.setText(objects.get(position).getTranslationString());
SpannableString originalTextString = new SpannableString("\n" + objects.get(position).getOriginalText());
originalTextString.setSpan(new RelativeSizeSpan(0.5f), 0, originalTextString.length(), 0);
holder.textView1.append(originalTextString);
holder.textView3.setText(objects.get(position).getUser());
return convertView;
}
}
So, that's the code I've written. A possible solution I thought of was if I used an array of views and loaded them accordingly, it may work? I'm really not really sure how I should be going about doing this - I'm still pretty new to Android.
I've searched a bit but could not get a helpful solution. Please direct me to a helpful solution you find or, a working answer would be most appreciable. Thank you.
I think the best way to achieve what you want is to put the flag to determine which layout to use on your ConversationContent object, then override getViewTypeCount() and getItemViewType(int position) something like this:
#Override
int getViewTypeCount() {
return 2;
}
#Override
int getItemViewType(int position) {
if (objects.get(position).isReply()) { //isReply can be whatever you want to determine whether to change layout
return 1;
}
return 0;
}
#Override
public View getView(int position, View convertView, ViewGroup parent)
{
ViewHolder holder = null;
if(convertView == null)
{
holder = new ViewHolder();
if (getItemViewType(position) == 1)
{
convertView = inflater.inflate(R.layout.conversation_item_1, null);
}
else
{
convertView = inflater.inflate(R.layout.conversation_item_2, null);
}
holder.textView1 = (TextView) convertView.findViewById(R.id.trans);
holder.textView1.setTypeface(Main_Activity.fontC);
holder.textView2 = (TextView) convertView.findViewById(R.id.lang);
holder.textView2.setTypeface(Main_Activity.fontC);
holder.textView3 = (TextView) convertView.findViewById(R.id.user);
holder.textView3.setTypeface(Main_Activity.fontC);
convertView.setTag(holder);
}
else
{
holder = (ViewHolder) convertView.getTag();
}
holder.textView1.setText(objects.get(position).getTranslatedText());
holder.textView2.setText(objects.get(position).getTranslationString());
SpannableString originalTextString = new SpannableString("\n" + objects.get(position).getOriginalText());
originalTextString.setSpan(new RelativeSizeSpan(0.5f), 0, originalTextString.length(), 0);
holder.textView1.append(originalTextString);
holder.textView3.setText(objects.get(position).getUser());
return convertView;
}
For listview adapter, if you want to show different layout,
like conversion mode. you would better override the following two methods:
//set your layout type here
public int getItemViewType(int position)
{
return 0;
}
//the layout count in your adapter
public int getViewTypeCount()
{
return 0;
}
Here is an example you can refer to:
public class ChatMessageAdapter extends BaseAdapter
{
private LayoutInflater mInflater;
private List<ChatMessage> mDatas;
public ChatMessageAdapter(Context context, List<ChatMessage> mDatas)
{
mInflater = LayoutInflater.from(context);
this.mDatas = mDatas;
}
#Override
public int getCount()
{
return mDatas.size();
}
#Override
public Object getItem(int position)
{
return mDatas.get(position);
}
#Override
public long getItemId(int position)
{
return position;
}
#Override
public int getItemViewType(int position)
{
ChatMessage chatMessage = mDatas.get(position);
if (chatMessage.getType() == Type.INCOMING)
{
return 0;
}
return 1;
}
#Override
public int getViewTypeCount()
{
return 2;
}
#Override
public View getView(int position, View convertView, ViewGroup parent)
{
ChatMessage chatMessage = mDatas.get(position);
ViewHolder viewHolder = null;
if (convertView == null)
{
if (getItemViewType(position) == 0)
{
convertView = mInflater.inflate(R.layout.item_from_msg, parent,
false);
viewHolder = new ViewHolder();
viewHolder.mDate = (TextView) convertView
.findViewById(R.id.id_form_msg_date);
viewHolder.mMsg = (TextView) convertView
.findViewById(R.id.id_from_msg_info);
} else
{
convertView = mInflater.inflate(R.layout.item_to_msg, parent,
false);
viewHolder = new ViewHolder();
viewHolder.mDate = (TextView) convertView
.findViewById(R.id.id_to_msg_date);
viewHolder.mMsg = (TextView) convertView
.findViewById(R.id.id_to_msg_info);
}
convertView.setTag(viewHolder);
} else
{
viewHolder = (ViewHolder) convertView.getTag();
}
//set data here
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
viewHolder.mDate.setText(df.format(chatMessage.getDate()));
viewHolder.mMsg.setText(chatMessage.getMsg());
return convertView;
}
private final class ViewHolder
{
TextView mDate;
TextView mMsg;
}
}

ListView recycling views, multiple layouts [duplicate]

This question already has an answer here:
ListView view recycling with CustomAdapter
(1 answer)
Closed 9 years ago.
I am having issues with views being recycled. I'm using 2 layouts but some of the rows change layouts when I scroll up and down. I've tried other tutorials with little success. Any suggestions?
public class CustomAdapter extends BaseAdapter {
Date date = new Date();
private OfferList[] offers;
private String nameCompare = "";
LayoutInflater inflater = getLayoutInflater();
CustomAdapter (OfferList[] offers, FetchItemsTask fetchItemsTask) {
this.offers = offers;
}
#Override
public View getView(int position, View convertView, ViewGroup parent){
ViewHolder holder = null;
if (convertView == null) {
holder = new ViewHolder();
if (getItemViewType(position) == 0) {
convertView = inflater.inflate(R.layout.list_offer_group, null);
}
else {
nameCompare = offers[position].getName();
convertView = inflater.inflate(R.layout.list_offer, null);
}
holder.name = (TextView) convertView.findViewById(R.id.name);
holder.color = (TextView) convertView.findViewById(R.id.car_color_stock);
holder.time = (TextView) convertView.findViewById(R.id.time);
holder.offerStatus = (TextView) convertView.findViewById(R.id.offer_status);
convertView.setTag(holder);
}
else {
holder = (ViewHolder) convertView.getTag();
}
holder.name.setText(offers[position].getCustomerName());
holder.carStockColor.setText(offers[position].getVehicleYear() + " " + offers[position].getVehicleMake());
java.util.Date time1 = new java.util.Date(Long.parseLong(offers[position].getModified()));
holder.time.setText(time1.toString().substring(0, 11) + " | ");
holder.offerStatus.setText(offers[position].getDealStatus());
return convertView;
}
#Override
public int getViewTypeCount() {
return 2;
}
#Override
public int getItemViewType(int position) {
if (nameCompare.equalsIgnoreCase(offers[position].getCustomerName())) {
return 0;
}
else {
return 1;
}
}
#Override
public int getCount() {
return offers.length;
}
#Override
public Object getItem(int position) {
return position;
}
#Override
public long getItemId(int position) {
return position;
}
public class ViewHolder {
public int type;
TextView name;
TextView color;
TextView time;
TextView offerStatus;
}
}
You have to implement a different logic. The problem with your code is, that if the convertView is not null, meaning it has been recycled, but it previously inflated a different view, than that, that correlates to your data, it will display the layout of the old recycled view (the other layout and not the layout, that you need for this dataset).
So you just have to check, if the recycled view inflated the layout, that you need for this particular row or if it inflated the other view. If the former is the case, then you can just set your data, if not, then you have to inflate the right view.

Android Icon on listView Custom Adaptor with separators

I want to include a play icon on a list view when ever user clicks on a row.
I am using a custom adapter (Lazy Load with separators)... I had issue with separator being overlapped with other rows so i implemented getViewTypeCount() method to resolve it.
Now when i am including a play icon on onItemClickListener of the list view, icon is getting added fine but its overlapping with other rows(except separator)...
Heres my code :
OnItemCLickListener :
listChannels.setOnItemClickListener(new OnItemClickListener() {
#Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
// TODO Auto-generated method stub
if (oldView != null) {
oldView.setDrawingCacheEnabled(true);
ImageView icon = (ImageView) oldView.findViewById(R.id.imageViewPlay);
icon.setImageBitmap(null);
icon.setVisibility(ImageView.GONE);
icon.invalidate();
}
oldView = arg1;
selectedItem = arg2;
ImageView icon = (ImageView) arg1.findViewById(R.id.imageViewPlay);
icon.setImageResource(R.drawable.play_small);
icon.setVisibility(ImageView.VISIBLE);
Intent intent = new Intent(StationList2.this,
ServiceLauncher.class);
intent.putExtra("objectPassed", feeds.get(arg2));
startActivity(intent);
}
});
My Custom Adapter :
private class MyCustomAdapter extends BaseAdapter {
private static final int TYPE_ITEM = 0;
private static final int TYPE_SEPARATOR = 1;
private static final int TYPE_MAX_COUNT = TYPE_SEPARATOR + 1;
private ArrayList<BeanChannelList> mData = new ArrayList<BeanChannelList>();
private LayoutInflater mInflater;
private TreeSet<Integer> mSeparatorsSet = new TreeSet<Integer>();
public MyCustomAdapter() {
mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
imageLoader = new ImageLoader(activity.getApplicationContext());
}
public void addItem(final BeanChannelList beanChannelList) {
mData.add(beanChannelList);
notifyDataSetChanged();
}
public void addSeparatorItem(final BeanChannelList beanChannelList) {
mData.add(beanChannelList);
// save separator position
mSeparatorsSet.add(mData.size() - 1);
notifyDataSetChanged();
}
#Override
public int getItemViewType(int position) {
return mSeparatorsSet.contains(position) ? TYPE_SEPARATOR
: TYPE_ITEM;
}
#Override
public int getViewTypeCount() {
return TYPE_MAX_COUNT;
}
#Override
public int getCount() {
return mData.size();
}
#Override
public String getItem(int position) {
return mData.get(position).getStrTitle();
}
#Override
public long getItemId(int position) {
return position;
}
#Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
int type = getItemViewType(position);
if (convertView == null) {
holder = new ViewHolder();
switch (type) {
case TYPE_ITEM:
convertView = mInflater
.inflate(R.layout.listitem_row, null);
holder.textView = (TextView) convertView
.findViewById(R.id.textView1);
holder.textview2 = (TextView) convertView
.findViewById(R.id.textView2);
holder.image = (ImageView) convertView
.findViewById(R.id.imageView1);
holder.imagePlay = (ImageView) convertView
.findViewById(R.id.imageViewPlay);
break;
case TYPE_SEPARATOR:
convertView = mInflater.inflate(R.layout.item2, null);
holder.textView = (TextView) convertView
.findViewById(R.id.textView1);
holder.textview2 = (TextView) convertView
.findViewById(R.id.textView2);
holder.image = (ImageView) convertView
.findViewById(R.id.imageView1);
holder.imagePlay = (ImageView) convertView
.findViewById(R.id.imageViewPlay);
convertView.setClickable(false);
convertView.setFocusable(false);
convertView.setFocusableInTouchMode(false);
convertView.setEnabled(false);
break;
}
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
try {
if (mData.get(position).getStrChannelNo().equals("")) {
holder.textView.setText(mData.get(position)
.getStrChannelNo()
+ " "
+ mData.get(position).getStrTitle());
}
else {
holder.textView.setText(mData.get(position)
.getStrChannelNo()
+ ": "
+ mData.get(position).getStrTitle());
}
if (selectedItem == position) {
holder.imagePlay.setImageResource(R.drawable.play_small);
holder.imagePlay.setVisibility(ImageView.VISIBLE);
}
holder.textview2.setText(mData.get(position).getStrLocation());
imageLoader.DisplayImage(mData.get(position).getStrImage()
.toString(), activity, holder.image);
} catch (Exception e) {
e.printStackTrace();
}
return convertView;
}
}
I guess problem is in ViewHolder. Once I had also same kind of problem. Do not use View Holder.

Categories

Resources