title: Is it possible to have different child views for an ExpandableListView in android based on a value from the parent adapter?
body: <p>In the app I'm working on, I currently use a button to open a new activity that has a simple filterable listview in it.  When the user clicks on a row in the listview, the selected value is returned back to the previous Activity to then have something done with it.  This means I have two activities to do one function.  </p>
  
  <p>I was looking for a way to combine the two elegantly, and think that an expandablelistview is the way to go, but I'm not sure about one thing:  Can the getChildView be overridden (custom expandablelistview) to inflate a different view based on a value in the parent group adapter?</p>
  
  <p>My adapter selects two values from an sqlite database,  an integer called "Type" and a String called "Move".  I only show the "Move", but bind the "Type" to an TextView that's hidden.   If I implement a single expandablelistview, I would need to somehow pass the "Type" to the drop down, so that it could display a different child view (allowing user to enter either weight, time, or reps, based on a type value of "1", "2", or "3".   </p>
  
  <p>Is this possible with a custom ELV that overrides the getchildview method? I see that you can get the parent position, and the child position, but besides using a global variable when the parent is clicked, I can't see anything that is passed to the child to know the value, text, etc that was the parent?</p>
  
  <p>I found a nice implementation as well here: <a href="https://github.com/tjerkw/Android-SlideExpandableListView" rel="nofollow noreferrer">https://github.com/tjerkw/Android-SlideExpandableListView</a>   </p>
  
  <p>But it seems too complex to try and override that, so I'm just going to try a standard Expandable List View if it's possible.</p>
  
  <p>Thankss!   </p>
  
  <p>Edit: Here's a bad mockup of what I'm talking about.  First drop would have a view with just a box and a button,  second view might have a box and a button, but third view has two boxes, one for weight, one for reps, and then a button.:</p>
  
  <p><img src="https://i.stack.imgur.com/lAIy2.png" alt="enter image description here"></p>