Commit 91b25ff1 by Paktalin

fixed bug with images in expandable list view

parent 15ebe070
......@@ -3,6 +3,7 @@ package com.example.paktalin.lavina.adapters;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Typeface;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
......@@ -58,9 +59,17 @@ public class ExpandableListAdapter extends BaseExpandableListAdapter {
}
TextView txtListChild = convertView.findViewById(R.id.lblListItem);
if (groupPosition == 0) {
String group = (String)getGroup(groupPosition);
Log.d("TEST", "current group" + group);
ImageView imageView = convertView.findViewById(R.id.image_item);
if (group.equals("COLOR")) {
Log.d("TEST", "wohoo");
imageView.setImageBitmap(colorImages[childPosition]);
} else {
imageView.setImageResource(android.R.color.transparent);
}
txtListChild.setText(childText);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment