ExpandableListView inside TabLayout and ViewPager but not shown

0

Good! I need a help, I initially have a TabLayout with ViewPager and 4 fragments, 3 of them with custom lists and working correctly, in the remaining tab (fragment) I want to add an ExpandableListView with its logic implemented but I can not get it show, here my fragment:

public class OcioFragment extends Fragment{

ExpandableListView expandableListView;
ExpandableListAdapter expandableListAdapter;
List<String> expandableListTitle;
HashMap<String, List<String>> expandableListDetail;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    final View rootView = inflater.inflate(R.layout.ocio_expandable,null,false);

    expandableListView = (ExpandableListView)rootView.findViewById(R.id.lista_expandible);
    expandableListDetail = opcionesOcio.getData();
    expandableListTitle = new ArrayList<String>(expandableListDetail.keySet());
    expandableListAdapter = new miAdaptadorExpan(getContext(), expandableListTitle, expandableListDetail);
    expandableListView.setAdapter(expandableListAdapter);

    return rootView;
}

}

The adapter defined in another class and the options of the list turn in another but I can not get it to show ... any ideas? Thanks in advance

    
asked by Joni - flKpgm 06.03.2017 в 01:07
source

1 answer

0

I'm new here and maybe I did not put the right or detailed answer;

It did not show the expandable because the content defined in my options class was not happening, which is where I have defined the contents of the ExpandableListView, in the end I had not passed the .put () to each list so it did not show them.

EXAMPLE expandableListDetail.put ("Shopping Centers", centroco);

After passing the arguments to each list, the problem was solved.

Thanks

    
answered by 06.03.2017 в 13:34