Skip to content Skip to sidebar Skip to footer

Hashmap Working In Simpleadapter But Not Working In Custom Array Adapter

Hashmap for the code below is working for simpleadapter array but not for custom array adapter .Why ? and how do I fix it ? Please Help.Unable to resolve .Tried everything. I am us

Solution 1:

In you custom Adapter you are returning position instead of Item

publicObjectgetItem(int position) {
            return position;
        }

Try use this

public Object getItem(int position) {
                return data.get(position);
            }

This will fix your problem

Post a Comment for "Hashmap Working In Simpleadapter But Not Working In Custom Array Adapter"