Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 03-12-2009, 04:35 PM   #1
Junior Member
 
Join Date: Feb 2009
Posts: 8
Friends: 0
View Destroythenseek's Profile   View Destroythenseek's Photo Album   View Destroythenseek's Blog   View Social Groups
Hey,
I have an expandable list that looks something like..


java Code:
  1. public class ExpandableList3 extends ExpandableListActivity {
  2.     private static final String NAME = "NAME";
  3.     private static final String IS_EVEN = "IS_EVEN";
  4.    
  5.     private ExpandableListAdapter mAdapter;
  6.    
  7.     @Override
  8.     public void onCreate(Bundle savedInstanceState) {
  9.         super.onCreate(savedInstanceState);
  10.  
  11.         List<Map<String, String>> groupData = new ArrayList<Map<String, String>>();
  12.         List<List<Map<String, String>>> childData = new ArrayList<List<Map<String, String>>>();
  13.         for (int i = 0; i < 20; i++) {
  14.             Map<String, String> curGroupMap = new HashMap<String, String>();
  15.             groupData.add(curGroupMap);
  16.             curGroupMap.put(NAME, "Group " + i);
  17.             curGroupMap.put(IS_EVEN, (i % 2 == 0) ? "This group is even" : "This group is odd");
  18.            
  19.             List<Map<String, String>> children = new ArrayList<Map<String, String>>();
  20.             for (int j = 0; j < 15; j++) {
  21.                 Map<String, String> curChildMap = new HashMap<String, String>();
  22.                 children.add(curChildMap);
  23.                 curChildMap.put(NAME, "Child " + j);
  24.                 curChildMap.put(IS_EVEN, (j % 2 == 0) ? "This child is even" : "This child is odd");
  25.             }
  26.             childData.add(children);
  27.         }
  28.        
  29.         // Set up our adapter
  30.         mAdapter = new SimpleExpandableListAdapter(
  31.                 this,
  32.                 groupData,
  33.                 android.R.layout.simple_expandable_list_item_1,
  34.                 new String[] { NAME, IS_EVEN },
  35.                 new int[] { android.R.id.text1, android.R.id.text2 },
  36.                 childData,
  37.                 android.R.layout.simple_expandable_list_item_2,
  38.                 new String[] { NAME, IS_EVEN },
  39.                 new int[] { android.R.id.text1, android.R.id.text2 }
  40.                 );
  41.         setListAdapter(mAdapter);
  42.     }
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..
Destroythenseek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 03-12-2009, 05:16 PM   #2
Member
 
VanillaTbone's Avatar
 
Join Date: Jan 2009
Location: Greenville, SC
Posts: 48
Friends: 1
View VanillaTbone's Profile   View VanillaTbone's Photo Album   View VanillaTbone's Blog   View Social Groups
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
VanillaTbone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 03-12-2009, 08:52 PM   #3
Junior Member
 
Join Date: Feb 2009
Posts: 8
Friends: 0
View Destroythenseek's Profile   View Destroythenseek's Photo Album   View Destroythenseek's Blog   View Social Groups
Thanks for any help VanillaTbone.
Destroythenseek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 03-13-2009, 11:25 AM   #4
Member
 
VanillaTbone's Avatar
 
Join Date: Jan 2009
Location: Greenville, SC
Posts: 48
Friends: 1
View VanillaTbone's Profile   View VanillaTbone's Photo Album   View VanillaTbone's Blog   View Social Groups
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...
VanillaTbone is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 03-19-2009, 04:59 PM   #5
Junior Member
 
Join Date: Feb 2009
Posts: 8
Friends: 0
View Destroythenseek's Profile   View Destroythenseek's Photo Album   View Destroythenseek's Blog   View Social Groups
anyone have any idea?
Destroythenseek is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



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


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 03:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.