Back to project page HydraListAndroid.
The source code is released under:
Apache License
If you think the Android project HydraListAndroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fada21.android.hydralist.expandable; //from www . j a v a 2 s. c o m import android.view.View; public class ExpandableViewHolder { private final int expandingLayout; public ExpandingLayout expandingLayoutViewGroup; public ExpandableViewHolder(View convertView, int expandingLayoutResId) { expandingLayout = expandingLayoutResId; expandingLayoutViewGroup = getExpandingLayoutSafely(convertView); } public ExpandingLayout getExpandingLayoutSafely(View convertView) { View expandingLayoutCandidate = convertView.findViewById(expandingLayout); if (expandingLayoutCandidate == null || !(expandingLayoutCandidate instanceof ExpandingLayout)) { throw new IllegalStateException( "ExpandingListAdapter should be provided with ExpandingLayout widget in its layout"); } else { return (ExpandingLayout) expandingLayoutCandidate; } } }