Note that there are some explanatory texts on larger screens.

plurals
  1. POSet onChildItemClickListner for ExpadableListView?
    primarykey
    data
    text
    <p>So, I was wondering if there is any method to set Up onclickListner for Expandable List view..<br> I know that it is possible when you haven't implement Child data with "HashMap". here is My code. I tired all possible onclick listeners for hashmap method. but no success yet. </p> <p>enter code here</p> <pre><code>package com.prashant.dfs; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.widget.ExpandableListView; public class Chapter_1_full extends Activity { ExpandableListAdapter listAdapter; ExpandableListView expListView; List&lt;String&gt; ListDataHeader; HashMap&lt;String,List&lt;String&gt;&gt; listDataChild; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chapter_1_full); //get the listView(expand) expListView = (ExpandableListView) findViewById(R.id.ch1_expand); //prepareDataList prepareListData(); listAdapter=new ExpandableListAdapter(this, ListDataHeader, listDataChild); expListView.setAdapter(listAdapter); } private void prepareListData() { ListDataHeader = new ArrayList&lt;String&gt;(); listDataChild=new HashMap&lt;String, List&lt;String&gt;&gt;(); //Adding child Data ListDataHeader.add("1.1 Introductin"); ListDataHeader.add("1.2 DataType"); ListDataHeader.add("1.3 ADT"); List&lt;String&gt; Intro = new ArrayList&lt;String&gt;(); Intro.add("WHAT is DFS"); Intro.add("Algorithem"); Intro.add("Flowchart"); List&lt;String&gt; datatype = new ArrayList&lt;String&gt;(); datatype.add("WHAT is DFS"); datatype.add("Algorithem"); datatype.add("Flowchart"); List&lt;String&gt; ADT = new ArrayList&lt;String&gt;(); ADT.add("WHAT is DFS"); ADT.add("Algorithem"); ADT.add("Flowchart"); listDataChild.put(ListDataHeader.get(0),Intro); listDataChild.put(ListDataHeader.get(1),datatype); listDataChild.put(ListDataHeader.get(2),ADT); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.chapter_1_full, menu); return true; } </code></pre> <p>}</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.
    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