I am getting following exception while adding header to listview on the line channellist.addHeaderView(header);
-
java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
I have tried both-
View header = View.inflate(getActivity(), R.layout.headerchannel, null);
and
View header = inflater.inflate(R.layout.headerchannel, null,false);
but same exception I am getting. My HomeActivity do have a framelayout and it is required for my project.
You should use