Overriding View.onSaveInstanceState() and View.onRestoreInstanceState() using View.BaseSavedState?
问题 Assume you want to derive your own View class from an existing View implementation, adding a bit of value, hence maintaining a few variables which represent your View's state in a meaningful way. It would be nice if your View would save its state automatically just like others do (if an ID is assigned) so you would want to override onRestoreInstanceState() and onSaveInstanceState() . Of course, you need to call the respective methods of your base class, and you need to combine your state