Hello,
I need to put in each of the sublists (child) of ExpandableListView a
header.
AddHeader function exists, but it places a header on top of the whole list,
not each of the sublists.
I think it should be done in getChildView or Group Listener.
The code for each is:
public View getChildView(int groupPosition, int childPosition, boolean
isLastChild, View convertView, ViewGroup parent) {
String hijo = (String)
getChild(groupPosition,childPosition);
LayoutInflater infalInflater = (LayoutInflater)
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView = infalInflater.inflate(R.layout.vista_punto, null);
TextView hijotxt = (TextView) convertView.findViewById(R.id.namePunto);
ImageView
imageView=(ImageView)convertView.findViewById(R.id.imagenFondoPunto);
imageView.setImageResource(R.drawable.unselecteditemviewcellbackground3);
hijotxt.setText(hijo);
return convertView;
}
final ExpandableListView l = (ExpandableListView)
findViewById(R.id.expandableListView1);
l.setOnGroupClickListener(new ExpandableListView.OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int
groupPosition, long id) {
datosUsuarios.ID_inc_actual =
datosUsuarios.Incidencias.get(groupPosition).getId();
datosUsuarios.grupo_actual=groupPosition;
return false;
}
});
Any idea how to do it or individually access each sublist to apply the
addHeader?
Thanks
--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.