android - Child selection in ExpandableListView -
Text after "
In a I thought The following part of the code I tested: Add the call to ExpandableListView it is possible to select a child's item in the beginning so that the group containing Expansion happens
setSelectedChild will do this but it does not produce any results.
the public class increases the main activity activity {Private Static Last String Title = "Title"; @SuppressWarnings ("Serial") @ Override Protected on Zero (Bundle Saved Instantstate) {Super. Secret (Saved Instantstate); ExpandableListView ListView = New Extension EligibilityListview (this); SimpleExpandableListAdapter adapter = New SimpleExpandableListAdapter (this, new ArrayList & lt; map & lt; string, string & gt; & gt; () {{this.add (new HashMap & lt; string, string & gt; () {{this .put (title, "group 1");}}); this.add (new HashMap & lt; string, string & gt; () {{this.put (title, "group2");}}); This.add (new HashMap & lt; string, string & gt; () {{this.put (title, "group 3");}})}}}, android.R.layout.simple_expandable_list_item_1, new string [] {Title}, new integer [] {android.R.id.text1}, new ArrayList & quot; string, string & gt; & gt; & gt; () {{this.add (new ArrayList & lt; map & LT; string, string C & gt; & gt; () {{this.add (new HashMap & LT; string, string & gt list & lt;? Map & lt extends) {{This.put (TITLE, "Hair 1-1 ");}}); This.add (new hashmop
listView.expandGroup ()
Girl selected before the set () . .
Highly-supplied group parameter is set to true
set selectedChild () If only it seems to work at least one group has expanded in the first place.
Comments
Post a Comment