1

I have one issue, Get the map key values and set the value in the expandable listview parent textview, The parent group size is dynamic

For example, I have parent group size is 2.

Parent textView 1 - History Status : Process

Parent textView 2 - History Status : Completed

Can you tell me the solution for this issue.

Sample code

@Override
    public View getGroupView(int groupPosition, boolean isExpanded,
            View convertView, ViewGroup parent) {
        ViewHolder holder;      
        if (convertView == null) {
            holder = new ViewHolder();              
            convertView = minflater.inflate(R.layout.history_status_view, parent, false); 
            holder.history_status = (TextView)convertView.findViewById(R.id.history_status);


        }
        else {
            holder = (ViewHolder) convertView.getTag();
        }
            for (Entry<String, List<History>> entry: map.entrySet()) {

            holder.history_status.setText(entry.getKey().toString());

        }



        return convertView; 
    }

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.