Closed marekdef closed 4 years ago
Thank you for reporting this problem!
There is indeed a problem when injecting a SkeletonLayout programmatically into a layout. As you have correctly assumed, the Skeleton serves as a wrapper around the original Views. So in the case of an injected View, we have to replace the original (to be masked) View with a SkeletonLayout which then contains the original View with all of its children.
I am currently working on a bugfix and expect a solution in version 2.0.1 later this day. Thanks again and have a nice day!
I want to use view.createSkeleton().showSkeleton() but if I do that I got exception
My layout is a textView inside ContraintLayout/FrameLayout and I am creating a skeleton in onCreate method (but this also fails if I do postDelayed or in onResume).
I can create a skeleton successfully if I wrap mentioned textview inside xml with SkeletonLayout so I guess I can expect createSkeleton to work in similar fashion (create a wrapper around existing view).
The question is: am I misusing this utility function?