title: Expandable Recycler View only showing one item in parent
body: <p>My recycler view has a parent and a child. My parent is only displaying one item with then all the topics in that one item. I can post my code below I'm not sure what it is I need to do to correct this as this is my first time using expandable views. I've posted the whole class below. Not sure what was needed for you to see. </p>
  
  <pre><code>public class TopicFragment extends Fragment {
  
      private View mRootView;
      private CategoryResponse mData;
      private CategoryFeedDataFactory mDataFactory;
      private List&lt;String&gt; mCategories;
  
      //Expandable Recycler View
      private List&lt;TopicItem&gt; mTopics;
      private TopicResponse mTopic;
      private TopicFeedDataFactory mTopicDataFactory;
      private CategoryItem mCategoryItem;
  
  
      //RecyclerView
      private RecyclerView mRecyclerView;
      private LinearLayoutManager mLayoutManager;
      private TopicExpandableAdapter mExpandableAdapter;
  
  
      public TopicFragment() {
          // Required empty public constructor
      }
  
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
                           Bundle savedInstanceState) {
  
          mRootView = inflater.inflate(R.layout.fragment_topic, container, false);
  
          initUI();
  
          return mRootView;
  
      }
  
      private void initUI() {
  
          mRecyclerView = (RecyclerView)   mRootView.findViewById(R.id.categoryView);
          mLayoutManager = new LinearLayoutManager(getActivity().getApplication().getApplicationContext());
  
          loadData();
  
  
      }
  
      private void loadData() {
          mDataFactory = new CategoryFeedDataFactory(getActivity().getApplicationContext());
          mTopicDataFactory = new TopicFeedDataFactory(getActivity().getApplicationContext());
  
          mDataFactory.getCategoryFeed(new CategoryFeedDataFactory.CategoryFeedDataFactoryCallback() {
              @Override
              public void onCategoryDataReceived(CategoryResponse response) {
  
                  mData = response;
  
              }
  
              @Override
              public void onCategoryDataFailed(Exception exception) {
  
              }
          });
  
          mTopicDataFactory.getAllTopics(new TopicFeedDataFactory.TopicFeedDataFactoryCallback() {
              @Override
              public void onTopicDataReceived(TopicResponse response) {
  
                  mTopic = response;
                  populateUIWithData();
  
              }
  
              @Override
              public void onTopicDataFailed(Exception exception) {
  
              }
          });
      }
  
      private void populateUIWithData() {
          mCategories = new ArrayList&lt;&gt;();
          mTopics = new ArrayList&lt;&gt;();
  
          for (int i = 0; i &lt;= mData.getItems().size(); i++) {
              if (mData != null) {
                  if (mData.getItem(i) != null) {
                      if (mData.getItem(i).getCategoryItem() != null &amp;&amp;
                              mData.getItem(i).getCategoryItem().getName() != null) {
                          mCategories.add(mData.getItem(i).getCategoryItem().getName());
                      }
                  }
  
              }
  
              for (int j = 0; j &lt;= mTopic.getItems().size(); j++) {
                  if (mTopic != null)
                      if (mTopic.getItem(j) != null)
                          if (mTopic.getItem(j).getTopicItem() != null)
                              if (mTopic.getItem(j).getTopicItem().getCategoryID() != null) {
                                  if (mData.getItem(i) != null &amp;&amp; mData.getItem(i).getCategoryItem() != null)
                                      if (mData.getItem(i).getCategoryItem().getId() != null)
                                      if (mTopic.getItem(j).getTopicItem().getCategoryID().equals
                                              (mData.getItem(i).getCategoryItem().getId())) {
  
                                          mTopics.add(mTopic.getItem(j).getTopicItem());
                                          mCategoryItem =
                                                  new CategoryItem(mData.getItem(i).getCategoryItem().getName(),
                                                          mTopics);
  
                                      }
  
                          }
          }
      }
  
  
      final List&lt;CategoryItem&gt; categoryItems = Collections.singletonList(mCategoryItem);
  
          mExpandableAdapter = new TopicExpandableAdapter(getActivity(), categoryItems);
          mExpandableAdapter.setExpandCollapseListener(new ExpandableRecyclerAdapter.ExpandCollapseListener() {
              @Override
              public void onListItemExpanded(int position) {
                  CategoryItem expandedCategoryItem = categoryItems.get(position);
  
                  String toastMsg = getResources().getString(R.string.expanded, expandedCategoryItem);
                  Toast.makeText(getActivity().getApplicationContext(),
                          toastMsg,
                          Toast.LENGTH_SHORT)
                          .show();
  
              }
  
              @Override
              public void onListItemCollapsed(int position) {
                  CategoryItem collapsedCategoryItem = categoryItems.get(position);
  
                  String toastMsg = getResources().getString(R.string.collapsed, collapsedCategoryItem.getName());
                  Toast.makeText(getActivity().getApplicationContext(),
                          toastMsg,
                          Toast.LENGTH_SHORT)
                          .show();
  
              }
          });
          mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
          mRecyclerView.setAdapter(mExpandableAdapter);
      }
  
  }
  </code></pre>
  
  <p>Am I just missing something really simple? Because this feels really complicated lol</p>
  
  <p>Thanks in advance!</p>