public View getView (final int position, View convertView, ViewGroup parent)
{
if (position == 0)
{ return myInflater.inflate (R.layout.item_title, null); / / Show title
} else { / / Display content
ViewHolder holder = null; if (convertView == null)
{ holder = new ViewHolder (); convertView = myInflater.inflate (R.layout.list_view_row, null); holder.message = (Textview) convertView.findViewById (R.id.message);
......
convertView.setTag (holder);
}
else
{ holder = (ViewHolder) convertView.getTag (); }
LinearLayout.LayoutParams ivparams = (android.widget.LinearLayout.LayoutParams) holder.message.getLayoutParams () ;/ / error line, reported a null pointer, because the holder the things inside are empty
......
return convertView; }
------ Solution ----------------------------------- ---------
GroupListView not solve your needs it?
------ For reference only ------------------ ---------------------
Thank you, then indeed changed ExpandableList the
没有评论:
发表评论