views:

44

answers:

1
HashMap myMap = (HashMap) getLastNonConfigurationInstance();

myMap is always null. getLastNonConfigurationInstance() should return an object.

public Object onRetainNonConfigurationInstance()
    {
        HashMap myMap = new HashMap();
        myMap.put("symbol", this.symbol);
        final Object data = myMap;
        return data;
    }

Why is this?

A: 

Duplicate of http://stackoverflow.com/questions/3640733/how-to-cast-an-object-to-a-hashmap

Romain Guy
this is related to android, not hashmap.
Sheehan Alam