Note that there are some explanatory texts on larger screens.

plurals
  1. POgetView function is called many times
    primarykey
    data
    text
    <p><code>getView</code> function is called many times hence the childview is being shown multiple times.I don't know why this is happening,the childrows are shown by 5 times as I have 5 textview in a row.here is my code <code>getChildView()</code> and <code>getChild()</code> of expandablelistview:</p> <pre><code> public View getChildView(int groupPosition,int childPosition, boolean isLastChild, View convertView, ViewGroup parent) { final List&lt;String&gt; childText = getChild(groupPosition, childPosition); if (convertView == null) { LayoutInflater infalInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); convertView = infalInflater.inflate(R.layout.childrow, null); } final TextView address = (TextView)convertView.findViewById(R.id.address); final TextView timings = (TextView)convertView.findViewById(R.id.timings); final TextView telephone = (TextView)convertView.findViewById(R.id.telephone); final TextView citcoun = (TextView)convertView.findViewById(R.id.citcoun); address.setText(childText.get(0)); timings.setText(childText.get(1)); telephone.setText(childText.get(2)); String citcounT = childText.get(3)+","+childText.get(4); citcoun.setText(citcounT); return convertView; } public List&lt;String&gt; getChild(int groupPosition, int childPosition) { return childnames.get(parentNames.get(groupPosition)); } </code></pre> <p>And its the xml of expnadablelist</p> <pre><code>&lt;LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" &gt; &lt;ExpandableListView android:id="@+id/storelist" android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" &gt; &lt;/ExpandableListView&gt; &lt;/LinearLayout&gt; </code></pre> <p>this is childrow.xml:</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/address" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_marginLeft="20dp" android:layout_marginTop="10dp" android:text="79-A HBFC,Faisla Town,Lahore" /&gt; &lt;TextView android:id="@+id/citcoun" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_marginLeft="20dp" android:layout_below="@+id/address" android:layout_marginTop="10dp" android:text="Lahore" /&gt; &lt;TextView android:id="@+id/timings" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/citcoun" android:layout_marginLeft="20dp" android:layout_marginTop="10dp" android:text="Mon-Sat: 9 am-10 pm" /&gt; &lt;TextView android:id="@+id/telephone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/timings" android:layout_marginTop="10dp" android:layout_marginLeft="20dp" android:text="0346-4678570" /&gt; </code></pre> <p></p> <p>Kindly help me if u know what's wrong with this</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload