Hi, So I have something like this now
* public class listmodified extends ListActivity implements OnGestureListener { //public ArrayList<String> myList = new ArrayList<String>(Arrays.asList(items)); public Map<Integer, String> myHashMap; { String Result=""; myHashMap = new HashMap<Integer, String>(); myHashMap.put(1, "one"); myHashMap.put(2, "two"); myHashMap.keySet().toArray(); myHashMap.values().toArray(); Result = ": + myHashMap.keySet().toArray() + myHashMap.values().toArray()"; } I probably need to iterate over the hashmap and populate items with Result. Items could be declared outside of the brackets as public static String[] items={}; * ** On Tue, Apr 3, 2012 at 11:04 PM, Justin Anderson <magouyaw...@gmail.com>wrote: > maybe I could use the following to feed the data to an ArrayAdapter >> from the Hashmap which is declared outside of MyClass not sure if that >> would work >> >> new ArrayList<String>(myHashMap. keySet()), assuming myHashMap is a >> HashMap<String, Something>. >> > Then your ArrayList would only have half the needed data.... It seemed > like you needed both the key and the value in the adapter. > > Thanks, > Justin Anderson > MagouyaWare Developer > http://sites.google.com/site/magouyaware > > > On Tue, Apr 3, 2012 at 3:01 PM, Graham Bright <gbwienmobil...@gmail.com>wrote: > >> maybe I could use the following to feed the data to an ArrayAdapter >> from the Hashmap which is declared outside of MyClass not sure if that >> would work >> >> new ArrayList<String>(myHashMap.keySet()), assuming myHashMap is a >> HashMap<String, Something>. >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en