android - save custom view drawing canvas on orientation change -
i have seen countless examples of people trying save variables in case user flips screen. did not find specific bitmaps or arraylist of paths successful.
so ithe idea have drawing app consist of main activity fragment inside. within fragment layout custom view class implement drawing via canvas, bitmaps, , arraylist. have found best way approach parcelables. have seen isn't idea pass bitmaps through. don't know how pass arraylist of paths through since takes general ints, string, etc.
simply convert list of path
s list of points
.
arraylist<path> -> arraylist<point>
btw, should store point locations in percentages instead of pixel values depending on need. then, recreate list of path
s list of point
s
Comments
Post a Comment