putExtra treeMap returns HashMap cannot be cast to TreeMap android

前端 未结 3 1215
星月不相逢
星月不相逢 2020-12-11 04:28

I need your help, I cannot understand what\'s happening?

I\'m trying to send a TreeMap between 2 activities, the code is something like this:

class O         


        
3条回答
  •  鱼传尺愫
    2020-12-11 04:31

    Sounds like it serializes to a HashMap and that's what you're getting. Guess you're gonna have to settle for a HashMap. Alternatively you can create your own helper class and implement Parcelable, then serialize the key/strings in order.

提交回复
热议问题