Android ExpandableListView with custom complex layout for items
<p>I'm working on an android application and I've hit a wall with a complex layout hierarchy I want to implement. The application will list the menus of a coffee place. As of right now, the menu looks like this:</p>

<p><a href="https://i.stack.imgur.com/PG69T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PG69T.png" alt="enter image description here"></a></p>

<p>The list is implemented as a <code>RecyclerView</code>. The custom adapter for the view takes care of each element's actions. Touching an element increments the order price and adds 1 to the total selected elements. You can also click the number to get a pick up dialog and change the amount. </p>

<p>As you can imagine there is a lot of code there.</p>

<p>This is the theoretical layout I want to implement:</p>

<p><a href="https://i.stack.imgur.com/F8Ala.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F8Ala.png" alt="enter image description here"></a></p>

<p>I'm focusing on the inner <code>ExpandableListView</code>. Basically I want to categorize the menu items by food, drink, etc. </p>

<p>The problem I have is that I don't know how can I preserve the "complexity" of the item's layout. I've managed to create a simple <code>ExpandableListView</code> with only the item name, like this:</p>

<p><a href="https://i.stack.imgur.com/lHraq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lHraq.png" alt="enter image description here"></a></p>

<p>But I really don't know how to use the item adapter I created for the previous layout within the <code>ExpandableListView</code>. Unfortunately I can't share much code, but I'm not asking for a code snippet, but more for orientation on how I could implement this, ideas, tips... It's my very first Android application :-)</p>

<p>Any help would be very much appreciated. </p>

<p>Thanks a lot!</p>