Putting the data from your hashmap into some persistent storage will probably not help you to get around initializing the hashmap when creating your activity. If your application frequently uses this activity it might be more worthwhile storing the Hashmap as a field in the Application class and then accessing from any activity via the application context.
SampleApplication extends Application{
private HashMap<String,String> mMap = null;
public void onCreate(){
//initialize your hashmap here
...
}
public getHashMap{
return this.mMap;
}
}
To get the map from any activity in your project just use the following code:
HashMap<String,String> map = ((SampleApplication)getApplicationContext()).getHashMap();
If you still need to store the data persistently you can choose one of five methods listed here. HashMap does implement Serializable so I would probably use SharedPreferences if it were me.
EDIT Mert's answer is great if the string's you're using never change, just use string resources instead. But if you need to do a fair amount of manipulation the convenience of a collection might still make the approach in my answer worth it.