|
|
|
03-12-2009, 04:35 PM
|
#1
|
|
Junior Member
Join Date: Feb 2009
Posts: 8
|
Hey,
I have an expandable list that looks something like..
java Code:
public class ExpandableList3 extends ExpandableListActivity { private static final String NAME = "NAME"; private static final String IS_EVEN = "IS_EVEN"; private ExpandableListAdapter mAdapter; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); List<Map<String, String>> groupData = new ArrayList<Map<String, String>>(); List<List<Map<String, String>>> childData = new ArrayList<List<Map<String, String>>>(); for (int i = 0; i < 20; i++) { Map<String, String> curGroupMap = new HashMap<String, String>(); groupData.add(curGroupMap); curGroupMap.put(NAME, "Group " + i); curGroupMap.put(IS_EVEN, (i % 2 == 0) ? "This group is even" : "This group is odd"); List<Map<String, String>> children = new ArrayList<Map<String, String>>(); for (int j = 0; j < 15; j++) { Map<String, String> curChildMap = new HashMap<String, String>(); children.add(curChildMap); curChildMap.put(NAME, "Child " + j); curChildMap.put(IS_EVEN, (j % 2 == 0) ? "This child is even" : "This child is odd"); } childData.add(children); } // Set up our adapter mAdapter = new SimpleExpandableListAdapter( this, groupData, android.R.layout.simple_expandable_list_item_1, new String[] { NAME, IS_EVEN }, new int[] { android.R.id.text1, android.R.id.text2 }, childData, android.R.layout.simple_expandable_list_item_2, new String[] { NAME, IS_EVEN }, new int[] { android.R.id.text1, android.R.id.text2 } ); setListAdapter(mAdapter); }
I want to make it so that when I click on one... It'll open a designated new window.
Help would be really appreciated.
Thanks,
Anton
Last edited by Destroythenseek; 03-12-2009 at 08:51 PM..
|
|
|
03-12-2009, 05:16 PM
|
#2
|
|
Member
Join Date: Jan 2009
Location: Greenville, SC
Posts: 48
|
If you don't mind, please place "[code]" tags around your coding to make it easier to read... My monitor is messed up and I find it hard to read...
Thanks
|
|
|
03-12-2009, 08:52 PM
|
#3
|
|
Junior Member
Join Date: Feb 2009
Posts: 8
|
Thanks for any help VanillaTbone.
|
|
|
03-13-2009, 11:25 AM
|
#4
|
|
Member
Join Date: Jan 2009
Location: Greenville, SC
Posts: 48
|
Anton,
Me and a friend of mine are going over the variables and hopefully we can help you come to a resolution on your issue.
Thanks for your patience...
|
|
|
03-19-2009, 04:59 PM
|
#5
|
|
Junior Member
Join Date: Feb 2009
Posts: 8
|
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Task or To-Do List
|
mezien |
Android Games And Applications |
7 |
07-09-2009 04:06 PM |
|
Add EditText with backgroundtxt to child of Expandable list?
|
Timo |
Android Development, Answers, Tutorials, and Code Snippets |
1 |
02-21-2009 09:17 PM |
|
Help going from list view, to relevant text view.
|
deenybird |
Android Development, Answers, Tutorials, and Code Snippets |
0 |
02-04-2009 12:26 PM |
|
Adding Button to List 'Go To', 'Bookmarks', 'Windows', Etc. with WebView
|
ruben |
Android Development, Answers, Tutorials, and Code Snippets |
0 |
06-20-2008 04:25 AM |
|
|
|
|