Craig wrote:
> TextView's implementation of onSaveInstanceState returns null

You're subclassing it, so you should be able to return whatever 
Parcelable you want. If, in some future Android implementation, the 
superclass returns something, you'll need to tuck that within your 
Parcelable as well.

> I couldn't find a way of instantiating a TextView.SavedState

Don't do that. Return a Parcelable of your choosing.

> and onRestoreState, which
> must be called, throws a ClassCastException if you call it with
> something other than a TextView.SavedState.

You can't get a ClassCastException on null. Since you got null from 
TextView#onSaveInstanceState(), you should be passing null to 
onRestoreInstanceState(), I would imagine.

These are educated guesses -- I haven't used View-level save/restore 
instance state, only at the activity level.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 1.4 Published!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to