My question is quite similar to this question. I want to achieve progress indicators that use this style:
That is replacing content like text and images with grey rectangles that animate like here.
I have seen this quite a lot in the past, e.g. Facebook. I am pretty sure that the YouTube app used to have this style.
The obvious first question is on how to this on Android and especially if there is an idiomatic, standard or simple way of achieving this and the second one is closely connected to this because here is my
How would I ever achieve converting a TextView
into such a loading rectangle. I could image replacing my whole view structure with this, but I also do not know where to start with the animation.
The content view is positioned using the layout of the parameters of the Placeholder (the Placeholder is simply constrained in the layout like any other view). Returns the behaviour of a placeholder when it contains no view.
A Placeholder provides a virtual object which can position an existing object. When the id of another view is set on a placeholder (using setContent () ), the placeholder effectively becomes the content view.
Use progress indicators to show the proportion of a task that is complete. To show progress an indicator is animated along a circular track in a clockwise direction. You can apply progress indicators to components such as a play button. Create progress indicators with a gap to leave space for important information such as the time.
android: progress – It sets the default progress of the progress bar, which can be set from 0 to max. android:interpolar – It is used to set an acceleration curve for the indeterminate progress bars. android: min – It defines the minimum value for the progress bar. android: progressTint – It applies Tint on progress indicator in the progress bar.
Take a look at this library - ShimmerLayout
ShimmerLayout can be used to add shimmer effect (like the one used at Facebook or at LinkedIn) to your Android application.
Also, if you curious about how to implement animation, take a look at the library sources.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With