Hide child in expandablelistview based on childposition
<p>I need to hide certain children of certain groups based on the groupPosition and the childPosition in an ExpandableListView. But on expanding the group multiple times (especially when the expanded group is not in focus), the value of childPosition that i get is not the same as before. So a different row gets hidden. Any idea how do i capture the right child everytime?</p>

<p>Right now I setting a different layout with height 0dp because if I setVisibility to View.GONE, it displays the row as blank.</p>

<pre><code>if (convertView == null) {

            if (((m_Budget.budget_planTypeid.equals("budget_single")) || (m_Budget.budget_planTypeid.equals("budget_double")) // hide
                                                                                                                                // pets
                    || (m_Budget.budget_planTypeid.equals("budget_singlefamily")) || (m_Budget.budget_planTypeid.equals("budget_doublefamily"))) &amp;&amp; (groupPosition == 4)
                    &amp;&amp; (childPosition == 5)) {
                convertView = inflater.inflate(R.layout.blankrow, parent, false);
            } else if (((m_Budget.budget_planTypeid.equals("budget_single")) || (m_Budget.budget_planTypeid.equals("budget_double")) // hide
                                                                                                                                        // child
                                                                                                                                        // care
                    || (m_Budget.budget_planTypeid.equals("budget_singlepet")) || (m_Budget.budget_planTypeid.equals("budget_doublepet"))) &amp;&amp; (groupPosition == 3)
                    &amp;&amp; (childPosition == 6)) {
                **convertView = inflater.inflate(R.layout.blankrow, parent, false);**
            } else {
                convertView = inflater.inflate(R.layout.budget_list_rowitem, parent, false);
            }
</code></pre>

<p>In bold is the layout of the blank row. else I set a usual layout</p>
