(Anyway, your attempt to use the WeakHashMap is totally hosed. You need to study up more on basic Java programming before you attempt any more Android stuff.)
On Oct 26, 5:11 pm, Anil <anil.r...@gmail.com> wrote: > The FAQ mentions a method of passing objects around activities. > (It is not clear to me): > > "A HashMap of WeakReferences to Objects > > You can also use a HashMap of WeakReferences to Objects with Long > keys. When an activity wants to pass an object to another activity, it > simply puts the object in the map and sends the key (which is a unique > Long based on a counter or time stamp) to the recipient activity via > intent extras. The recipient activity retrieves the object using this > key." > > Trying to pass a StringBuilder to another activity, > // trailBuilder is a StringBuilder > WeakHashMap wkmap = new > WeakHashMap<String,StringBuilder>(); > wkmap.put("trailBuilder", trailBuilder); > alertIntent.putExtra("trailBundle",wkmap); // compile > ERROR here > > Can anyone point me to an example of how this is done? > thanks, > Anil -- 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