He añadido miras a la cabecera de listVivew,ClassCastException con ListView al ejecutar notifyDataSetChanged
View TopSearch = (View) View.inflate(this, R.layout.search, null);
lv.addHeaderView(TopSearch, null, false);
Y todo está bien hasta que intento ejecutar (cuando cambian los datos)
adapter.notifyDataSetChanged();
Eso siempre bloquear mi aplicación y darme el siguiente error:
> java.lang.ClassCastException: android.widget.HeaderViewListAdapter
Si elimino la vista de encabezado, entonces no hay ningún error. ¿Alguna sugerencia? Gracias.
Debe usar 'ListView.LayoutParams'. Marque [esta pregunta] [1]. [1]: http://stackoverflow.com/questions/4393775/android-classcastexception-when-adding-a-header-view-to-expandablelistview/4401369#4401369 – Macarse