Note that there are some explanatory texts on larger screens.

plurals
  1. POonChildClick does not work for my ExpandableListView
    primarykey
    data
    text
    <p>I am unable to know the reason that why the heck <code>onChildClick</code> of my <code>ExpandableListView</code> is not working. But onGroupClick works as it should. </p> <p>here is what I have</p> <pre><code>fileExpandableList.setOnGroupClickListener(this); fileExpandableList .setOnChildClickListener(new ExpandableListView.OnChildClickListener() { @Override public boolean onChildClick(ExpandableListView parent, View v, int groupPosition, int childPosition, long id) { System.out.println("Child CLICKED."); return false; } }); </code></pre> <p>I have seen many people having this problem but no one had conclusive answer. </p> <p><strong>ADDED:</strong></p> <pre><code>@Override public boolean isChildSelectable(int groupPosition, int childPosition) { return true; } </code></pre> <p>list view xml:</p> <pre><code>... &lt;ExpandableListView android:id="@android:id/list" android:drawSelectorOnTop="false" android:groupIndicator="@drawable/group_indicator" style="@style/allWrapper" &gt; &lt;/ExpandableListView&gt; &lt;/FrameLayout&gt; </code></pre> <p></p> <p>child row xml</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/expandablelist_childrow" style="@style/allmenu" &gt; &lt;com.abc.xyz.android.view.TypeModuleView android:id="@+id/expandablelist_childview" android:longClickable="true" android:onClick="myOnClick" style="@style/module" &gt; &lt;/com.abc.xyz.android.view.TypeModuleView&gt; </code></pre> <p></p> <p>myOnClick event handler</p> <pre><code> public void myOnClick(View view) { TypeModule clickedModule = ((TypeModuleView) view).onClick(); if (clickedModule != null) { // In landscape layout moduleContentFragment.setModuleParent(clickedModule); moduleContentFragment.changePath("/"); // Added for module highlighting expandableListFragment.setChildrenBackground(view); } } </code></pre>
    singulars
    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.
    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