title: Android - ListView Item Change Height of Item
body: <p>I have a Custom ListView that has some TextView &amp; a Button, The default height of ListView Item View is 100dp but on button click I want to increase the height of that specific Row Item to the e.g. 500dp. The problem is I can increase the height of row but it doesn't increase the height of List Content View<img src="https://i.stack.imgur.com/io6CK.png" alt="enter image description here"></p>
  
  <p>This is when list is collapsed once I click "+" button it expands but it looks really odd.
  <img src="https://i.stack.imgur.com/pxNXe.png" alt="enter image description here"></p>
  
  <p>What I need to make it look like is Accordion Type View.</p>
  
  <p><strong>Code to Change the Height:</strong></p>
  
  <pre><code>LinearLayout row_view = (LinearLayout)v.getParent().getParent().getParent().getParent().getParent().getParent();
                  if(mCurrentBg == R.drawable.widget_minus)
                  {
                      v.setBackgroundResource(R.drawable.widget_plus);
                      mCurrentBg = R.drawable.widget_plus;
                      row_view.getLayoutParams().height = (int) Common.convertDpToPixel(100, context);                    
                  }
                  else
                  {
                      mCurrentBg = R.drawable.widget_minus;
                      row_view.getLayoutParams().height =(int) Common.convertDpToPixel(700, context);                 
                      v.setBackgroundResource(R.drawable.widget_minus);                   
                  }
                  row_view.requestLayout();
                  row_view.invalidate();
  </code></pre>
  
  <p>Thanks</p>