Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Class cast exception in generateDefaultLayoutParams #58

Closed
girishnair12345 opened this issue Nov 25, 2014 · 1 comment
Closed

Class cast exception in generateDefaultLayoutParams #58

girishnair12345 opened this issue Nov 25, 2014 · 1 comment

Comments

@girishnair12345
Copy link

Hi,

I was trying to customise the PinnedListAdapter and I got ClassCastException, for line layoutParams = (LayoutParams) generateDefaultLayoutParams();
So I have changed it to
layoutParams = (AbsListView.LayoutParams) new AbsListView.LayoutParams(
AbsListView.LayoutParams.MATCH_PARENT,
AbsListView.LayoutParams.WRAP_CONTENT, 0);

And now it works fine,
Is this a bug ?

@sergejsha
Copy link
Owner

Dy default PinnedSectionListView uses generateDefaultLayoutParams() of AbsListView, which is correct. If you change inheritance or override generateDefaultLayoutParams(), then it might break the implementation, which is expected consequence of such changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants