android自定义view状态保存
要保存view的状态,至少有两点需要满足:
- view要有id
- 要调用setSaveEnabled(true)
<com.zxc.draganddraw.BoxDrawingView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawingview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>